]> git.proxmox.com Git - qemu.git/commitdiff
vl.c: avoid preprocessor directives in a printf call
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2010 15:49:59 +0000 (16:49 +0100)
committermalc <av1474@comtv.ru>
Mon, 8 Feb 2010 09:12:40 +0000 (12:12 +0300)
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>
Signed-off-by: malc <av1474@comtv.ru>
qemu-options.hx
vl.c

index 2fa9ed48e5a3c024d3a23a74a5bf1eff52789225..bb2d4fa5bec69a6c31d41a14bf3a02c0dc3b5afa 100644 (file)
@@ -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 92a31ba3f9aeeb6701bc8581387317c87cfb0f4f..5ddf1febdfe36af452230d391fdcc31aba5b5a0d 100644 (file)
--- 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);
 }