From patchwork Mon Dec 12 08:21:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 130669 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DCCF3B6F9A for ; Mon, 12 Dec 2011 19:22:19 +1100 (EST) Received: from localhost ([::1]:35322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra19F-0007Nl-6k for incoming@patchwork.ozlabs.org; Mon, 12 Dec 2011 03:22:09 -0500 Received: from eggs.gnu.org ([140.186.70.92]:33974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra18z-0007Jk-Qs for qemu-devel@nongnu.org; Mon, 12 Dec 2011 03:22:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ra18y-00039J-2I for qemu-devel@nongnu.org; Mon, 12 Dec 2011 03:21:53 -0500 Received: from ozlabs.org ([203.10.76.45]:60277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ra18x-000393-D9 for qemu-devel@nongnu.org; Mon, 12 Dec 2011 03:21:52 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 0FF90B70BB; Mon, 12 Dec 2011 19:21:48 +1100 (EST) From: Michael Ellerman To: qemu-devel@nongnu.org Date: Mon, 12 Dec 2011 19:21:42 +1100 Message-Id: <1323678104-30133-1-git-send-email-michael@ellerman.id.au> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1323677680.3070.43.camel@concordia> References: <1323677680.3070.43.camel@concordia> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 203.10.76.45 Cc: Michael Ellerman Subject: [Qemu-devel] [PATCH 1/3] Add arch mask to headings but don't use it yet X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Make it possible to specify what architecture a heading in the help doco applies to. Signed-off-by: Michael Ellerman --- A possibly nicer way to do this would be to add a new macro, perhaps ARCHHEADING, that is used for architecture specific headings. That would make the help source nicer, in that most headings would just be DEFHEADINGS - but it would mean we need to #define/undef another set of macros at each location we include the options. --- qemu-options.h | 2 +- qemu-options.hx | 42 +++++++++++++++++++++--------------------- scripts/hxtool | 2 +- vl.c | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/qemu-options.h b/qemu-options.h index c96f994..c8c3022 100644 --- a/qemu-options.h +++ b/qemu-options.h @@ -31,7 +31,7 @@ enum { #define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ opt_enum, -#define DEFHEADING(text) +#define DEFHEADING(text, arch_mask) #include "qemu-options.def" #undef DEF #undef DEFHEADING diff --git a/qemu-options.hx b/qemu-options.hx index 681eaf1..cf03763 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -6,7 +6,7 @@ HXCOMM construct option structures, enums and help message for specified HXCOMM architectures. HXCOMM HXCOMM can be used for comments, discarded from both texi and C -DEFHEADING(Standard options:) +DEFHEADING(Standard options:, QEMU_ARCH_ALL) STEXI @table @option ETEXI @@ -525,9 +525,9 @@ possible drivers and properties, use @code{-device ?} and @code{-device @var{driver},?}. ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) -DEFHEADING(File system options:) +DEFHEADING(File system options:, QEMU_ARCH_ALL) DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, "-fsdev fsdriver,id=id,path=path,[security_model={mapped|passthrough|none}]\n" @@ -583,9 +583,9 @@ Specifies the tag name to be used by the guest to mount this export point ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) -DEFHEADING(Virtual File system pass-through options:) +DEFHEADING(Virtual File system pass-through options:, QEMU_ARCH_ALL) DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs, "-virtfs local,path=path,mount_tag=tag,security_model=[mapped|passthrough|none]\n" @@ -640,7 +640,7 @@ STEXI Create synthetic file system image ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) DEF("name", HAS_ARG, QEMU_OPTION_name, "-name string1[,process=string2]\n" @@ -669,9 +669,9 @@ STEXI @end table ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) -DEFHEADING(Display options:) +DEFHEADING(Display options:, QEMU_ARCH_ALL) STEXI @table @option @@ -1062,9 +1062,9 @@ STEXI @end table ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_I386) -DEFHEADING(i386 target only:) +DEFHEADING(i386 target only:, QEMU_ARCH_I386) STEXI @table @option ETEXI @@ -1160,12 +1160,12 @@ Specify SMBIOS type 0 fields Specify SMBIOS type 1 fields ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) STEXI @end table ETEXI -DEFHEADING(Network options:) +DEFHEADING(Network options:, QEMU_ARCH_ALL) STEXI @table @option ETEXI @@ -1484,9 +1484,9 @@ is activated if no @option{-net} options are provided. @end table ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) -DEFHEADING(Character device options:) +DEFHEADING(Character device options:, QEMU_ARCH_ALL) DEF("chardev", HAS_ARG, QEMU_OPTION_chardev, "-chardev null,id=id[,mux=on|off]\n" @@ -1734,10 +1734,10 @@ Connect to a spice virtual machine channel, such as vdiport. @end table ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) STEXI -DEFHEADING(Device URL Syntax:) +DEFHEADING(Device URL Syntax:, QEMU_ARCH_ALL) In addition to using normal file images for the emulated storage devices, QEMU can also use networked resources such as iSCSI devices. These are @@ -1823,7 +1823,7 @@ See also @url{http://http://www.osrg.net/sheepdog/}. @end table ETEXI -DEFHEADING(Bluetooth(R) options:) +DEFHEADING(Bluetooth(R) options:, QEMU_ARCH_ALL) DEF("bt", HAS_ARG, QEMU_OPTION_bt, \ "-bt hci,null dumb bluetooth HCI - doesn't respond to commands\n" \ @@ -1893,9 +1893,9 @@ Virtual wireless keyboard implementing the HIDP bluetooth profile. @end table ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) -DEFHEADING(Linux/Multiboot boot specific:) +DEFHEADING(Linux/Multiboot boot specific:, QEMU_ARCH_ALL) STEXI When using these options, you can use a given Linux or Multiboot @@ -1941,9 +1941,9 @@ STEXI @end table ETEXI -DEFHEADING() +DEFHEADING(, QEMU_ARCH_ALL) -DEFHEADING(Debug/Expert options:) +DEFHEADING(Debug/Expert options:, QEMU_ARCH_ALL) STEXI @table @option diff --git a/scripts/hxtool b/scripts/hxtool index 7ca83ed..8d07f01 100644 --- a/scripts/hxtool +++ b/scripts/hxtool @@ -45,7 +45,7 @@ hxtotexi() fi ;; DEFHEADING*) - echo "$(expr "$str" : "DEFHEADING(\(.*\))")" + echo "$(expr "$str" : "DEFHEADING(\(.*\),.*)")" ;; *) test $flag -eq 1 && echo "$str" diff --git a/vl.c b/vl.c index a50842b..6a2ca6f 100644 --- a/vl.c +++ b/vl.c @@ -1495,7 +1495,7 @@ static void help(int exitcode) const char *options_help = #define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ opt_help -#define DEFHEADING(text) stringify(text) "\n" +#define DEFHEADING(text, arch_mask) stringify(text) "\n" #include "qemu-options.def" #undef DEF #undef DEFHEADING @@ -1531,7 +1531,7 @@ static const QEMUOption qemu_options[] = { { "h", 0, QEMU_OPTION_h, QEMU_ARCH_ALL }, #define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ { option, opt_arg, opt_enum, arch_mask }, -#define DEFHEADING(text) +#define DEFHEADING(text, arch_mask) #include "qemu-options.def" #undef DEF #undef DEFHEADING