qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, quintela@redhat.com, sheng@linux.intel.com
Subject: [Qemu-devel] [PATCH 4/4] vl.c: avoid preprocessor directives in a printf call
Date: Thu,  4 Feb 2010 16:49:59 +0100	[thread overview]
Message-ID: <1265298599-4186-5-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <201002042313.45353.sheng@linux.intel.com>

Similar to the qemu-img.c patch, but I also have to unescape remaining
% signs in qemu-options.hx.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qemu-options.hx |    4 ++--
 vl.c            |   18 ++++++++++--------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index 2fa9ed4..bb2d4fa 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -430,7 +430,7 @@ Also optionally set the top visible process name in Linux.
 ETEXI
 
 DEF("uuid", HAS_ARG, QEMU_OPTION_uuid,
-    "-uuid %%08x-%%04x-%%04x-%%04x-%%012x\n"
+    "-uuid %08x-%04x-%04x-%04x-%012x\n"
     "                specify machine UUID\n")
 STEXI
 @item -uuid @var{uuid}
@@ -773,7 +773,7 @@ ETEXI
 DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
     "-smbios file=binary\n"
     "                load SMBIOS entry from binary file\n"
-    "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%%d.%%d]\n"
+    "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]\n"
     "                specify SMBIOS type 0 fields\n"
     "-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
     "              [,uuid=uuid][,sku=str][,family=str]\n"
diff --git a/vl.c b/vl.c
index 3d2de7b..057046e 100644
--- a/vl.c
+++ b/vl.c
@@ -4021,11 +4021,7 @@ static void version(void)
 
 static void help(int exitcode)
 {
-    version();
-    printf("usage: %s [options] [disk_image]\n"
-           "\n"
-           "'disk_image' is a raw hard image image for IDE hard disk 0\n"
-           "\n"
+    const char *options_help =
 #define DEF(option, opt_arg, opt_enum, opt_help)        \
            opt_help
 #define DEFHEADING(text) stringify(text) "\n"
@@ -4033,15 +4029,21 @@ static void help(int exitcode)
 #undef DEF
 #undef DEFHEADING
 #undef GEN_DOCS
+        ;
+    version();
+    printf("usage: %s [options] [disk_image]\n"
+           "\n"
+           "'disk_image' is a raw hard image image for IDE hard disk 0\n"
            "\n"
+           "%s\n"
            "During emulation, the following keys are useful:\n"
            "ctrl-alt-f      toggle full screen\n"
            "ctrl-alt-n      switch to virtual console 'n'\n"
            "ctrl-alt        toggle mouse and keyboard grab\n"
            "\n"
-           "When using -nographic, press 'ctrl-a h' to get some help.\n"
-           ,
-           "qemu");
+           "When using -nographic, press 'ctrl-a h' to get some help.\n",
+           "qemu",
+           options_help);
     exit(exitcode);
 }
 
-- 
1.6.6

      parent reply	other threads:[~2010-02-04 15:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-04  7:04 [Qemu-devel] "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c Sheng Yang
2010-02-04 12:09 ` [Qemu-devel] " Paolo Bonzini
2010-02-04 12:10 ` [Qemu-devel] " Jamie Lokier
2010-02-04 17:52   ` Markus Armbruster
2010-02-04 12:31 ` [Qemu-devel] " Juan Quintela
2010-02-04 13:29   ` [Qemu-devel] [PATCH] qemu-img: avoid preprocessor directives in a printf call Paolo Bonzini
2010-02-04 15:13     ` [Qemu-devel] " Sheng Yang
2010-02-04 15:49       ` [Qemu-devel] [PATCH 0/4] Fix printf calls embedding preprocessor directives Paolo Bonzini
2010-02-05  2:26         ` [Qemu-devel] " Sheng Yang
2010-02-05  8:30           ` Kevin Wolf
2010-02-05  8:47           ` Paolo Bonzini
2010-02-04 15:49       ` [Qemu-devel] [PATCH 1/4] qemu-img: avoid preprocessor directives in a printf call Paolo Bonzini
2010-02-04 15:49       ` [Qemu-devel] [PATCH 2/4] cope with printf macro definition in readline.c Paolo Bonzini
2010-02-04 15:49       ` [Qemu-devel] [PATCH 3/4] do not interpolate % from vl.c to qemu-options.h Paolo Bonzini
2010-02-04 15:49       ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265298599-4186-5-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=sheng@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).