]> git.proxmox.com Git - qemu.git/commitdiff
arch_init.c: Improve '-soundhw help' for non-HAS_AUDIO_CHOICE archs
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 19 Sep 2012 13:51:38 +0000 (14:51 +0100)
committermalc <av1474@comtv.ru>
Wed, 19 Sep 2012 13:55:08 +0000 (17:55 +0400)
For architectures which don't set HAS_AUDIO_CHOICE, improve the
'-soundhw help' message so that it doesn't simply print an empty
list, implying no sound support at all.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: malc <av1474@comtv.ru>
arch_init.c

index 47977de7c6a692a93a84271cd879ef2aa2ed6521..f849f9b872d02ccaabf08e0c7ff904af0d643b26 100644 (file)
@@ -922,11 +922,16 @@ void select_soundhw(const char *optarg)
     if (is_help_option(optarg)) {
     show_valid_cards:
 
+#ifdef HAS_AUDIO_CHOICE
         printf("Valid sound card names (comma separated):\n");
         for (c = soundhw; c->name; ++c) {
             printf ("%-11s %s\n", c->name, c->descr);
         }
         printf("\n-soundhw all will enable all of the above\n");
+#else
+        printf("Machine has no user-selectable audio hardware "
+               "(it may or may not have always-present audio hardware).\n");
+#endif
         exit(!is_help_option(optarg));
     }
     else {