]> git.proxmox.com Git - qemu.git/commitdiff
Revert "On some systems printf is a macro"
authormalc <av1474@comtv.ru>
Mon, 8 Feb 2010 09:04:56 +0000 (12:04 +0300)
committermalc <av1474@comtv.ru>
Mon, 8 Feb 2010 09:12:40 +0000 (12:12 +0300)
This reverts commit bc5b6004588ad17370e0416e40b4aa9cf977023b.

qemu-img.c
readline.c
vl.c

index bbfeea18a7ae636571c88032cb8fe36eefa21bf8..cbba4fc790030a7fcbba0bdadc37e74e51012098 100644 (file)
@@ -58,41 +58,41 @@ static void format_print(void *opaque, const char *name)
 /* Please keep in synch with qemu-img.texi */
 static void help(void)
 {
-    (printf)("qemu-img version " QEMU_VERSION ", Copyright (c) 2004-2008 Fabrice Bellard\n"
-             "usage: qemu-img command [command options]\n"
-             "QEMU disk image utility\n"
-             "\n"
-             "Command syntax:\n"
+    printf("qemu-img version " QEMU_VERSION ", Copyright (c) 2004-2008 Fabrice Bellard\n"
+           "usage: qemu-img command [command options]\n"
+           "QEMU disk image utility\n"
+           "\n"
+           "Command syntax:\n"
 #define DEF(option, callback, arg_string)        \
            "  " arg_string "\n"
 #include "qemu-img-cmds.h"
 #undef DEF
 #undef GEN_DOCS
-             "\n"
-             "Command parameters:\n"
-             "  'filename' is a disk image filename\n"
-             "  'fmt' is the disk image format. It is guessed automatically in most cases\n"
-             "  'size' is the disk image size in bytes. Optional suffixes\n"
-             "    'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n"
-             "    and T (terabyte, 1024G) are supported. 'b' is ignored.\n"
-             "  'output_filename' is the destination disk image filename\n"
-             "  'output_fmt' is the destination format\n"
-             "  'options' is a comma separated list of format specific options in a\n"
-             "    name=value format. Use -o ? for an overview of the options supported by the\n"
-             "    used format\n"
-             "  '-c' indicates that target image must be compressed (qcow format only)\n"
-             "  '-u' enables unsafe rebasing. It is assumed that old and new backing file\n"
-             "       match exactly. The image doesn't need a working backing file before\n"
-             "       rebasing in this case (useful for renaming the backing file)\n"
-             "  '-h' with or without a command shows this help and lists the supported formats\n"
-             "\n"
-             "Parameters to snapshot subcommand:\n"
-             "  'snapshot' is the name of the snapshot to create, apply or delete\n"
-             "  '-a' applies a snapshot (revert disk to saved state)\n"
-             "  '-c' creates a snapshot\n"
-             "  '-d' deletes a snapshot\n"
-             "  '-l' lists all snapshots in the given image\n"
-        );
+           "\n"
+           "Command parameters:\n"
+           "  'filename' is a disk image filename\n"
+           "  'fmt' is the disk image format. It is guessed automatically in most cases\n"
+           "  'size' is the disk image size in bytes. Optional suffixes\n"
+           "    'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n"
+           "    and T (terabyte, 1024G) are supported. 'b' is ignored.\n"
+           "  'output_filename' is the destination disk image filename\n"
+           "  'output_fmt' is the destination format\n"
+           "  'options' is a comma separated list of format specific options in a\n"
+           "    name=value format. Use -o ? for an overview of the options supported by the\n"
+           "    used format\n"
+           "  '-c' indicates that target image must be compressed (qcow format only)\n"
+           "  '-u' enables unsafe rebasing. It is assumed that old and new backing file\n"
+           "       match exactly. The image doesn't need a working backing file before\n"
+           "       rebasing in this case (useful for renaming the backing file)\n"
+           "  '-h' with or without a command shows this help and lists the supported formats\n"
+           "\n"
+           "Parameters to snapshot subcommand:\n"
+           "  'snapshot' is the name of the snapshot to create, apply or delete\n"
+           "  '-a' applies a snapshot (revert disk to saved state)\n"
+           "  '-c' creates a snapshot\n"
+           "  '-d' deletes a snapshot\n"
+           "  '-l' lists all snapshots in the given image\n"
+           );
     printf("\nSupported formats:");
     bdrv_iterate_format(format_print, NULL);
     printf("\n");
index 165ae35a4bb19fd28a11554eb5cc4f009e779258..7834af0f6b4c4baa9dfd54986519b05ce4e25f74 100644 (file)
 #define IS_ESC  1
 #define IS_CSI  2
 
-#ifdef printf
-#undef printf
-#endif
-
 #define printf do_not_use_printf
 
 void readline_show_prompt(ReadLineState *rs)
diff --git a/vl.c b/vl.c
index c22e300f0da87a7182815268c39a5dabe0173c02..ea9a95c65d2573aba29cca43b757656181f24afe 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -4022,10 +4022,10 @@ 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"
+    printf("usage: %s [options] [disk_image]\n"
+           "\n"
+           "'disk_image' is a raw hard image image for IDE hard disk 0\n"
+           "\n"
 #define DEF(option, opt_arg, opt_enum, opt_help)        \
            opt_help
 #define DEFHEADING(text) stringify(text) "\n"
@@ -4033,22 +4033,22 @@ static void help(int exitcode)
 #undef DEF
 #undef DEFHEADING
 #undef GEN_DOCS
-             "\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",
-             DEFAULT_RAM_SIZE,
+           "\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",
+           DEFAULT_RAM_SIZE,
 #ifndef _WIN32
-             DEFAULT_NETWORK_SCRIPT,
-             DEFAULT_NETWORK_DOWN_SCRIPT,
+           DEFAULT_NETWORK_SCRIPT,
+           DEFAULT_NETWORK_DOWN_SCRIPT,
 #endif
-             DEFAULT_GDBSTUB_PORT,
-             "/tmp/qemu.log");
+           DEFAULT_GDBSTUB_PORT,
+           "/tmp/qemu.log");
     exit(exitcode);
 }