[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V3 3/7] qemu-nbd: add doc for internal snapshot
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V3 3/7] qemu-nbd: add doc for internal snapshot export |
Date: |
Tue, 01 Oct 2013 08:49:16 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
On 09/25/2013 06:16 PM, Wenchao Xia wrote:
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
> qemu-nbd.c | 11 ++++++++++-
> qemu-nbd.texi | 11 ++++++++++-
> 2 files changed, 20 insertions(+), 2 deletions(-)
This should be squashed into 2/7. When adding new options, the
documentation should be added at the same time.
> +" the temporary one\n"
> +" -l, --load-snapshot=SNAPSHOT_ID_OR_NAME\n"
> +" load an internal snapshot inside FILE and export
> it\n"
> +" as an read-only device\n"
> +" -L, --load-snapshot1=SNAPSHOT_PARAM\n"
> +" load an internal snapshot inside FILE and export
> it\n"
> +" as an read-only device, SNAPSHOT_PARAM format is\n"
> +" 'snapshot.id=[ID],snapshot.name=[NAME]'\n"
Why can't ONE option be good enough? In other words, make the command
line parser smart enough so that:
--load-snapshot=name
tries SNAPSHOT_ID_OR_NAME, while
--load-snapshot=snapshot.id=xyz,snapshot.name=name
tries the SNAPSHOT_PARAM form. In other words, if the optarg begins
with 'snapshot.', assume the SNAPSHOT_PARAM form, otherwise use the
SNAPSHOT_ID_OR_NAME form. Then you only burn one short option letter,
and avoid the problem with ambiguous abbreviation that I complained
about in 2/7.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH V3 3/7] qemu-nbd: add doc for internal snapshot export,
Eric Blake <=