From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEKgp-0003pp-EJ for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:51:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEKgo-0006Qy-EN for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:51:43 -0400 Received: from 38.0.169.217.in-addr.arpa ([217.169.0.38]:34655 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEKgo-0006Pm-7s for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:51:42 -0400 From: Peter Maydell Date: Wed, 19 Sep 2012 14:51:38 +0100 Message-Id: <1348062698-4528-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] arch_init.c: Improve '-soundhw help' for non-HAS_AUDIO_CHOICE archs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org 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 --- arch_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch_init.c b/arch_init.c index 47977de..f849f9b 100644 --- a/arch_init.c +++ b/arch_init.c @@ -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 { -- 1.7.9.5