Commit d2c639d6 authored by blueswir1's avatar blueswir1

Synch code, help and docs

Rearrange code, help printout and docs so that they are in the same
(hopefully more logical) order for easier maintenance.

Add help and docs for undocumented options.

Reformat slightly for more consistent help output.

Add comments to encourage better synchronization in the future.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6432 c046a42c-6fe2-441c-8c8c-71466251a162
parent 0ec3ff52
......@@ -1429,6 +1429,7 @@ static void do_info_balloon(void)
term_printf("balloon: actual=%d\n", (int)(actual >> 20));
}
/* Please update qemu-doc.texi when adding or changing commands */
static const term_cmd_t term_cmds[] = {
{ "help|?", "s?", do_help,
"[cmd]", "show the help" },
......@@ -1496,8 +1497,8 @@ static const term_cmd_t term_cmds[] = {
"path [frequency bits channels]",
"capture audio to a wave file (default frequency=44100 bits=16 channels=2)" },
#endif
{ "stopcapture", "i", do_stop_capture,
"capture index", "stop capture" },
{ "stopcapture", "i", do_stop_capture,
"capture index", "stop capture" },
{ "memsave", "lis", do_memory_save,
"addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", },
{ "pmemsave", "lis", do_physical_memory_save,
......@@ -1520,9 +1521,10 @@ static const term_cmd_t term_cmds[] = {
{ NULL, NULL, },
};
/* Please update qemu-doc.texi when adding or changing commands */
static const term_cmd_t info_cmds[] = {
{ "version", "", do_info_version,
"", "show the version of qemu" },
"", "show the version of QEMU" },
{ "network", "", do_info_network,
"", "show the network state" },
{ "chardev", "", qemu_chr_info,
......@@ -1554,9 +1556,9 @@ static const term_cmd_t info_cmds[] = {
{ "jit", "", do_info_jit,
"", "show dynamic compiler info", },
{ "kqemu", "", do_info_kqemu,
"", "show kqemu information", },
"", "show KQEMU information", },
{ "kvm", "", do_info_kvm,
"", "show kvm information", },
"", "show KVM information", },
{ "usb", "", usb_info,
"", "show guest USB devices", },
{ "usbhost", "", usb_host_info,
......
This diff is collapsed.
......@@ -50,6 +50,7 @@ static void format_print(void *opaque, const char *name)
printf(" %s", 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"
......@@ -61,7 +62,7 @@ static void help(void)
" commit [-f fmt] filename\n"
" convert [-c] [-e] [-6] [-f fmt] [-O output_fmt] [-B output_base_image] filename [filename2 [...]] output_filename\n"
" info [-f fmt] filename\n"
" snapshot [-l|-a snapshot|-c snapshot|-d snapshot] filename\n"
" snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename\n"
"\n"
"Command parameters:\n"
" 'filename' is a disk image filename\n"
......@@ -72,22 +73,24 @@ static void help(void)
" content as the input's base image, however the path, image format, etc may\n"
" differ\n"
" 'fmt' is the disk image format. It is guessed automatically in most cases\n"
" 'size' is the disk image size in kilobytes. Optional suffixes 'M' (megabyte)\n"
" and 'G' (gigabyte) are supported\n"
" 'size' is the disk image size in kilobytes. Optional suffixes\n"
" 'M' (megabyte, 1024 * 1024) and 'G' (gigabyte, 1024 * 1024 * 1024) are"
" supported any @code{k} or @code{K} is ignored\n"
" 'output_filename' is the destination disk image filename\n"
" 'output_fmt' is the destination format\n"
" '-c' indicates that target image must be compressed (qcow format only)\n"
" '-e' indicates that the target image must be encrypted (qcow format only)\n"
" '-6' indicates that the target image must use compatibility level 6 (vmdk format only)\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"
"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 format:");
printf("\nSupported formats:");
bdrv_iterate_format(format_print, NULL);
printf("\n");
exit(1);
......
......@@ -12,6 +12,7 @@ The following commands are supported:
@item commit [-f @var{fmt}] @var{filename}
@item convert [-c] [-e] [-6] [-f @var{fmt}] [-O @var{output_fmt}] [-B @var{output_base_image}] @var{filename} [@var{filename2} [...]] @var{output_filename}
@item info [-f @var{fmt}] @var{filename}
@item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot}] @var{filename}
@end table
Command parameters:
......@@ -59,7 +60,8 @@ CD-ROM images present for example in the Knoppix CD-ROMs.
@item size
is the disk image size in kilobytes. Optional suffixes @code{M}
(megabyte) and @code{G} (gigabyte) are supported
(megabyte, 1024 * 1024) and @code{G} (gigabyte, 1024 * 1024 * 1024)
are supported and any @code{k} or @code{K} is ignored.
@item output_filename
is the destination disk image filename
......@@ -73,6 +75,24 @@ indicates that target image must be compressed (qcow format only)
indicates that the target image must be encrypted (qcow format only)
@item -6
indicates that the target image must use compatibility level 6 (vmdk format only)
@item -h
with or without a command shows help and lists the supported formats
@end table
Parameters to snapshot subcommand:
@table @option
@item snapshot
is the name of the snapshot to create, apply or delete
@item -a
applies a snapshot (revert disk to saved state)
@item -c
creates a snapshot
@item -d
deletes a snapshot
@item -l
lists all snapshots in the given image
@end table
Command description:
......@@ -115,6 +135,10 @@ Give information about the disk image @var{filename}. Use it in
particular to know the size reserved on disk which can be different
from the displayed size. If VM snapshots are stored in the disk image,
they are displayed too.
@item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
List, apply, create or delete snapshots in image @var{filename}.
@end table
@c man end
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment