diff mbox

[V3,6/7] qemu-img: add doc for param -L in convert

Message ID 1380154568-5339-7-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Sept. 26, 2013, 12:16 a.m. UTC
Also renamed snapshot_name to snapshot_id_or_name to tip better.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 qemu-img-cmds.hx |    2 +-
 qemu-img.c       |    2 ++
 qemu-img.texi    |    7 +++++--
 3 files changed, 8 insertions(+), 3 deletions(-)

Comments

Eric Blake Oct. 1, 2013, 2:56 p.m. UTC | #1
On 09/25/2013 06:16 PM, Wenchao Xia wrote:
> Also renamed snapshot_name to snapshot_id_or_name to tip better.

s/to tip better/as a better hint of what it does/

> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> ---
>  qemu-img-cmds.hx |    2 +-
>  qemu-img.c       |    2 ++
>  qemu-img.texi    |    7 +++++--
>  3 files changed, 8 insertions(+), 3 deletions(-)

Squash this into 5/7.

> +           "  'snapshot_param' is param used for internal snapshot, format is\n"
> +           "    'snapshot.id=[ID],snapshot.name=[NAME]'\n"

Again, can you reuse the existing -s, instead of having to add -L, by
making the command line parser smarter about whether it is seeing a
single name vs. a string starting with 'snapshot.'?
Wayne Xia Oct. 10, 2013, 6:09 a.m. UTC | #2
于 2013/10/1 22:56, Eric Blake 写道:
> On 09/25/2013 06:16 PM, Wenchao Xia wrote:
>> Also renamed snapshot_name to snapshot_id_or_name to tip better.
> s/to tip better/as a better hint of what it does/
>
>> Signed-off-by: Wenchao Xia<xiawenc@linux.vnet.ibm.com>
>> ---
>>   qemu-img-cmds.hx |    2 +-
>>   qemu-img.c       |    2 ++
>>   qemu-img.texi    |    7 +++++--
>>   3 files changed, 8 insertions(+), 3 deletions(-)
> Squash this into 5/7.
>
   OK.

>> +           "  'snapshot_param' is param used for internal snapshot, format is\n"
>> +           "    'snapshot.id=[ID],snapshot.name=[NAME]'\n"
> Again, can you reuse the existing -s, instead of having to add -L, by
   There may be compatiability issue for existing user, I think add -l 
and deprecate old -s,
would be better.

> making the command line parser smarter about whether it is seeing a
> single name vs. a string starting with 'snapshot.'?
>
diff mbox

Patch

diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
index da1d965..39f150c 100644
--- a/qemu-img-cmds.hx
+++ b/qemu-img-cmds.hx
@@ -34,7 +34,7 @@  STEXI
 ETEXI
 
 DEF("convert", img_convert,
-    "convert [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-O output_fmt] [-o options] [-s snapshot_name] [-S sparse_size] filename [filename2 [...]] output_filename")
+    "convert [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-O output_fmt] [-o options] [-s snapshot_id_or_name] [-L snapshot_param] [-S sparse_size] filename [filename2 [...]] output_filename")
 STEXI
 @item convert [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-O @var{output_fmt}] [-o @var{options}] [-s @var{snapshot_name}] [-S @var{sparse_size}] @var{filename} [@var{filename2} [...]] @var{output_filename}
 ETEXI
diff --git a/qemu-img.c b/qemu-img.c
index a784ad4..29eabaf 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -93,6 +93,8 @@  static void help(void)
            "  '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"
+           "  'snapshot_param' is param used for internal snapshot, format is\n"
+           "    'snapshot.id=[ID],snapshot.name=[NAME]'\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"
diff --git a/qemu-img.texi b/qemu-img.texi
index 768054e..c025ba6 100644
--- a/qemu-img.texi
+++ b/qemu-img.texi
@@ -46,6 +46,9 @@  is the destination disk image filename
 is a comma separated list of format specific options in a
 name=value format. Use @code{-o ?} for an overview of the options supported
 by the used format or see the format descriptions below for details.
+@item snapshot_param
+is param used for internal snapshot, format is
+'snapshot.id=[ID],snapshot.name=[NAME]'
 
 
 @item -c
@@ -179,9 +182,9 @@  Error on reading data
 
 @end table
 
-@item convert [-c] [-p] [-n] [-f @var{fmt}] [-t @var{cache}] [-O @var{output_fmt}] [-o @var{options}] [-s @var{snapshot_name}] [-S @var{sparse_size}] @var{filename} [@var{filename2} [...]] @var{output_filename}
+@item convert [-c] [-p] [-n] [-f @var{fmt}] [-t @var{cache}] [-O @var{output_fmt}] [-o @var{options}] [-s @var{snapshot_id_or_name}] [-L @var{snapshot_param}] [-S @var{sparse_size}] @var{filename} [@var{filename2} [...]] @var{output_filename}
 
-Convert the disk image @var{filename} or a snapshot @var{snapshot_name} to disk image @var{output_filename}
+Convert the disk image @var{filename} or a snapshot @var{snapshot_id_or_name} to disk image @var{output_filename}
 using format @var{output_fmt}. It can be optionally compressed (@code{-c}
 option) or use any format specific options like encryption (@code{-o} option).