Skip to contentSkip to conversation

[6432] Synch code, help and docs

Qemu-devel Blue Swirl 1 participant 1 message Jan 24, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 6432

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6432
Author:   blueswir1
Date:     2009-01-24 18:19:25 +0000 (Sat, 24 Jan 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
trunk/monitor.c
trunk/qemu-doc.texi
trunk/qemu-img.c
trunk/qemu-img.texi
trunk/vl.c

Modified: trunk/monitor.c
===================================================================

monitor.c +7 -5
@@ -1429,6 +1429,7 @@
         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 @@
       "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 @@
     { 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 @@
     { "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,

Modified: trunk/qemu-doc.texi
===================================================================

qemu-doc.texi +347 -183

733 lines not on this page · raw message

Modified: trunk/qemu-img.c
===================================================================

qemu-img.c +13 -10
@@ -50,6 +50,7 @@
     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 @@
            "  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 @@
            "    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);

Modified: trunk/qemu-img.texi
===================================================================

qemu-img.texi +25 -1
@@ -12,6 +12,7 @@
 @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 @@
 
 @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,8 +75,26 @@
 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:
 
 @table @option
@@ -115,6 +135,10 @@
 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

Modified: trunk/vl.c
===================================================================

vl.c +168 -136

494 lines not on this page · raw message