mirror of https://github.com/xqemu/xqemu.git
On some systems printf is a macro
Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
parent
d0f2c4c602
commit
bc5b600458
60
qemu-img.c
60
qemu-img.c
|
@ -58,41 +58,41 @@ static void format_print(void *opaque, const char *name)
|
||||||
/* Please keep in synch with qemu-img.texi */
|
/* Please keep in synch with qemu-img.texi */
|
||||||
static void help(void)
|
static void help(void)
|
||||||
{
|
{
|
||||||
printf("qemu-img version " QEMU_VERSION ", Copyright (c) 2004-2008 Fabrice Bellard\n"
|
(printf)("qemu-img version " QEMU_VERSION ", Copyright (c) 2004-2008 Fabrice Bellard\n"
|
||||||
"usage: qemu-img command [command options]\n"
|
"usage: qemu-img command [command options]\n"
|
||||||
"QEMU disk image utility\n"
|
"QEMU disk image utility\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Command syntax:\n"
|
"Command syntax:\n"
|
||||||
#define DEF(option, callback, arg_string) \
|
#define DEF(option, callback, arg_string) \
|
||||||
" " arg_string "\n"
|
" " arg_string "\n"
|
||||||
#include "qemu-img-cmds.h"
|
#include "qemu-img-cmds.h"
|
||||||
#undef DEF
|
#undef DEF
|
||||||
#undef GEN_DOCS
|
#undef GEN_DOCS
|
||||||
"\n"
|
"\n"
|
||||||
"Command parameters:\n"
|
"Command parameters:\n"
|
||||||
" 'filename' is a disk image filename\n"
|
" 'filename' is a disk image filename\n"
|
||||||
" 'fmt' is the disk image format. It is guessed automatically in most cases\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"
|
" 'size' is the disk image size in bytes. Optional suffixes\n"
|
||||||
" 'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n"
|
" 'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n"
|
||||||
" and T (terabyte, 1024G) are supported. 'b' is ignored.\n"
|
" and T (terabyte, 1024G) are supported. 'b' is ignored.\n"
|
||||||
" 'output_filename' is the destination disk image filename\n"
|
" 'output_filename' is the destination disk image filename\n"
|
||||||
" 'output_fmt' is the destination format\n"
|
" 'output_fmt' is the destination format\n"
|
||||||
" 'options' is a comma separated list of format specific options in a\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"
|
" name=value format. Use -o ? for an overview of the options supported by the\n"
|
||||||
" used format\n"
|
" used format\n"
|
||||||
" '-c' indicates that target image must be compressed (qcow format only)\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"
|
" '-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"
|
" match exactly. The image doesn't need a working backing file before\n"
|
||||||
" rebasing in this case (useful for renaming the backing file)\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"
|
" '-h' with or without a command shows this help and lists the supported formats\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Parameters to snapshot subcommand:\n"
|
"Parameters to snapshot subcommand:\n"
|
||||||
" 'snapshot' is the name of the snapshot to create, apply or delete\n"
|
" 'snapshot' is the name of the snapshot to create, apply or delete\n"
|
||||||
" '-a' applies a snapshot (revert disk to saved state)\n"
|
" '-a' applies a snapshot (revert disk to saved state)\n"
|
||||||
" '-c' creates a snapshot\n"
|
" '-c' creates a snapshot\n"
|
||||||
" '-d' deletes a snapshot\n"
|
" '-d' deletes a snapshot\n"
|
||||||
" '-l' lists all snapshots in the given image\n"
|
" '-l' lists all snapshots in the given image\n"
|
||||||
);
|
);
|
||||||
printf("\nSupported formats:");
|
printf("\nSupported formats:");
|
||||||
bdrv_iterate_format(format_print, NULL);
|
bdrv_iterate_format(format_print, NULL);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
#define IS_ESC 1
|
#define IS_ESC 1
|
||||||
#define IS_CSI 2
|
#define IS_CSI 2
|
||||||
|
|
||||||
|
#ifdef printf
|
||||||
|
#undef printf
|
||||||
|
#endif
|
||||||
|
|
||||||
#define printf do_not_use_printf
|
#define printf do_not_use_printf
|
||||||
|
|
||||||
void readline_show_prompt(ReadLineState *rs)
|
void readline_show_prompt(ReadLineState *rs)
|
||||||
|
|
36
vl.c
36
vl.c
|
@ -4022,10 +4022,10 @@ static void version(void)
|
||||||
static void help(int exitcode)
|
static void help(int exitcode)
|
||||||
{
|
{
|
||||||
version();
|
version();
|
||||||
printf("usage: %s [options] [disk_image]\n"
|
(printf)("usage: %s [options] [disk_image]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"'disk_image' is a raw hard image image for IDE hard disk 0\n"
|
"'disk_image' is a raw hard image image for IDE hard disk 0\n"
|
||||||
"\n"
|
"\n"
|
||||||
#define DEF(option, opt_arg, opt_enum, opt_help) \
|
#define DEF(option, opt_arg, opt_enum, opt_help) \
|
||||||
opt_help
|
opt_help
|
||||||
#define DEFHEADING(text) stringify(text) "\n"
|
#define DEFHEADING(text) stringify(text) "\n"
|
||||||
|
@ -4033,22 +4033,22 @@ static void help(int exitcode)
|
||||||
#undef DEF
|
#undef DEF
|
||||||
#undef DEFHEADING
|
#undef DEFHEADING
|
||||||
#undef GEN_DOCS
|
#undef GEN_DOCS
|
||||||
"\n"
|
"\n"
|
||||||
"During emulation, the following keys are useful:\n"
|
"During emulation, the following keys are useful:\n"
|
||||||
"ctrl-alt-f toggle full screen\n"
|
"ctrl-alt-f toggle full screen\n"
|
||||||
"ctrl-alt-n switch to virtual console 'n'\n"
|
"ctrl-alt-n switch to virtual console 'n'\n"
|
||||||
"ctrl-alt toggle mouse and keyboard grab\n"
|
"ctrl-alt toggle mouse and keyboard grab\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When using -nographic, press 'ctrl-a h' to get some help.\n"
|
"When using -nographic, press 'ctrl-a h' to get some help.\n"
|
||||||
,
|
,
|
||||||
"qemu",
|
"qemu",
|
||||||
DEFAULT_RAM_SIZE,
|
DEFAULT_RAM_SIZE,
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
DEFAULT_NETWORK_SCRIPT,
|
DEFAULT_NETWORK_SCRIPT,
|
||||||
DEFAULT_NETWORK_DOWN_SCRIPT,
|
DEFAULT_NETWORK_DOWN_SCRIPT,
|
||||||
#endif
|
#endif
|
||||||
DEFAULT_GDBSTUB_PORT,
|
DEFAULT_GDBSTUB_PORT,
|
||||||
"/tmp/qemu.log");
|
"/tmp/qemu.log");
|
||||||
exit(exitcode);
|
exit(exitcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue