On 09/25/2013 06:16 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com> > --- > 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