From patchwork Wed Sep 19 13:51:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 11506 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4114923EFF for ; Wed, 19 Sep 2012 13:51:45 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id E65BC3D0957E for ; Wed, 19 Sep 2012 13:51:44 +0000 (UTC) Received: by ieje10 with SMTP id e10so1044526iej.11 for ; Wed, 19 Sep 2012 06:51:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=xm358DfOBISYFWSul4MTYBvwV7OGxbkrGeM1pic83JM=; b=hzAG1soOZSUA8PviX/JmwAjw6n2zYGmVqTWQac3ox6W5yIl9fWIGg8mDtnK1LGn7zG O5ThWkRP1d4MJ5MnWSIc25UlT10CR9SF6jBWItCgiairw3cENghapGW7pCryG3Dyeqvv M2JhxjW0133+O6JJP/Z5w76yJv1YBaC7mupy4I9yGe+2yit2/rrDwgp+ykBp26pbI+wq fkf9NJdrc3fjHbgSZEyW9MaJ0wu4vwDTXkexPiQtOs9ATH+XOEI9cT16HG4vP3oab+h8 CaaF1fE++5+gPn2/uK0CxGMBK4ekKH1hdI1ofpmwCO/hqtYRCByk04dJoKxmDHFkj0/2 dyfA== Received: by 10.50.217.229 with SMTP id pb5mr2663681igc.28.1348062704155; Wed, 19 Sep 2012 06:51:44 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp22552igc; Wed, 19 Sep 2012 06:51:43 -0700 (PDT) Received: by 10.180.109.129 with SMTP id hs1mr6983183wib.0.1348062702362; Wed, 19 Sep 2012 06:51:42 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ed3si35010741wib.27.2012.09.19.06.51.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Sep 2012 06:51:42 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TEKgk-0001BT-SF; Wed, 19 Sep 2012 14:51:38 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, malc Subject: [PATCH] arch_init.c: Improve '-soundhw help' for non-HAS_AUDIO_CHOICE archs Date: Wed, 19 Sep 2012 14:51:38 +0100 Message-Id: <1348062698-4528-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQnuwocJfC0q9+8RbfDSx2I1OVi7bN0HuUuMlFHYuwf0ze8S+1mcC1ZEYGzsKDBIxrIh2gca 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 {