]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl - return error state, fail when no configuration is found
authorJaroslav Kysela <perex@perex.cz>
Wed, 4 Oct 2006 08:14:24 +0000 (10:14 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 4 Oct 2006 08:14:24 +0000 (10:14 +0200)
See bug#843

alsactl/alsactl.c
alsactl/state.c

index 2770ee249dbb717abeb4848f3aabd2aaa08af954..07b102d2f92680c708f62c81448e5b51f8b2425a 100644 (file)
@@ -119,5 +119,5 @@ int main(int argc, char *argv[])
                res = -ENODEV;
        }
 
-       return res < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+       return res < 0 ? res : 0;
 }
index 3610797777655cdc1e4af76f09d996f500128922..d2cf6cf43ecc3a6bfa0e2f00323bca4a36944f20 100644 (file)
@@ -1194,7 +1194,6 @@ static int set_controls(int card, snd_config_t *top)
                                id = tmpid;
                }
                if (err < 0) {
-                       err = 0;
                        fprintf(stderr, "No state is present for card %s\n", id);
                        goto _close;
                }