Skip to content
Snippets Groups Projects
Commit e00291c0 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by malc
Browse files

qemu-img: avoid preprocessor directives in a printf call


Other choices include using "(printf)", but this one is not bad in
terms of readability.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarmalc <av1474@comtv.ru>
parent 3f020d70
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,8 @@ 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"
const char *help_msg =
"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"
......@@ -91,9 +92,9 @@ static void help(void)
" '-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:");
" '-l' lists all snapshots in the given image\n";
printf("%s\nSupported formats:", help_msg);
bdrv_iterate_format(format_print, NULL);
printf("\n");
exit(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment