alsactl: honor ignore_nocards flag in init()

BugLink: https://github.com/alsa-project/alsa-utils/issues/75
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-03-06 12:40:54 +01:00
parent e1551de8dd
commit 65453da000

View file

@ -1758,6 +1758,8 @@ int init(const char *filename, int flags, const char *cardname)
break; break;
if (card < 0) { if (card < 0) {
if (first) { if (first) {
if (ignore_nocards)
return 0;
error("No soundcards found..."); error("No soundcards found...");
return -ENODEV; return -ENODEV;
} }