aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-10-02 11:46:22 -0400
committerTaylor Holberton <taylorcholberton@gmail.com>2016-10-02 11:46:22 -0400
commite4666d918d30cc23c5c34758f0965e6d5d725d73 (patch)
tree40951d5f1657018e33f075c7577e0dcc3436bc48
parenteea43893a5f5a658b54ffc10584e227d4d91508a (diff)
always printing control list, showing usage when argc == 1
-rw-r--r--utils/tinymix.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/tinymix.c b/utils/tinymix.c
index 5966df9..f57238a 100644
--- a/utils/tinymix.c
+++ b/utils/tinymix.c
@@ -65,15 +65,14 @@ int main(int argc, char **argv)
}
+ printf("Mixer name: '%s'\n", mixer_get_name(mixer));
+ tinymix_list_controls(mixer);
if (argc == 1) {
- printf("Mixer name: '%s'\n", mixer_get_name(mixer));
- tinymix_list_controls(mixer);
+ printf("Usage: tinymix [-D card] [control id] [value to set]\n");
} else if (argc == 2) {
tinymix_detail_control(mixer, argv[1], 1);
} else if (argc >= 3) {
tinymix_set_value(mixer, argv[1], &argv[2], argc - 2);
- } else {
- printf("Usage: tinymix [-D card] [control id] [value to set]\n");
}
mixer_close(mixer);