From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7zl0-0008VW-Ow for qemu-devel@nongnu.org; Mon, 27 Jan 2014 22:54:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7zku-000611-MZ for qemu-devel@nongnu.org; Mon, 27 Jan 2014 22:54:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7zku-00060x-EL for qemu-devel@nongnu.org; Mon, 27 Jan 2014 22:54:32 -0500 From: Amos Kong Date: Tue, 28 Jan 2014 11:53:47 +0800 Message-Id: <1390881230-14033-3-git-send-email-akong@redhat.com> In-Reply-To: <1390881230-14033-1-git-send-email-akong@redhat.com> References: <1390881230-14033-1-git-send-email-akong@redhat.com> Subject: [Qemu-devel] [PATCH 2/5] introduce two marcos to dump the options info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jyang@redhat.com, laine@redhat.com, libvir-list@redhat.com, armbru@redhat.com, rjones@redhat.com, anthony@codemonkey.ws, pbonzini@redhat.com, lcapitulino@redhat.com We will use the marocs to generate two tables, which contain the option name and argument information. Signed-off-by: Amos Kong --- qemu-options-wrapper.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/qemu-options-wrapper.h b/qemu-options-wrapper.h index 13bfea0..c36a9ee 100644 --- a/qemu-options-wrapper.h +++ b/qemu-options-wrapper.h @@ -18,6 +18,22 @@ #define DEFHEADING(text) ARCHHEADING(text, QEMU_ARCH_ALL) +#elif defined(QEMU_OPTIONS_GENERATE_NAME) + +#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ + option, + +#define DEFHEADING(text) +#define ARCHHEADING(text, arch_mask) + +#elif defined(QEMU_OPTIONS_GENERATE_HASARG) + +#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ + stringify(opt_arg), + +#define DEFHEADING(text) +#define ARCHHEADING(text, arch_mask) + #elif defined(QEMU_OPTIONS_GENERATE_OPTIONS) #define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ @@ -38,4 +54,6 @@ #undef QEMU_OPTIONS_GENERATE_ENUM #undef QEMU_OPTIONS_GENERATE_HELP +#undef QEMU_OPTIONS_GENERATE_NAME +#undef QEMU_OPTIONS_GENERATE_HASPARAM #undef QEMU_OPTIONS_GENERATE_OPTIONS -- 1.8.4.2