From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR1GP-00084P-AR for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:49:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VR1GK-0004yv-Co for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:49:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR1GK-0004yq-4l for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:49:20 -0400 Message-ID: <524AE0EC.1010802@redhat.com> Date: Tue, 01 Oct 2013 08:49:16 -0600 From: Eric Blake MIME-Version: 1.0 References: <1380154568-5339-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1380154568-5339-4-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1380154568-5339-4-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vT5PiWc8k6d34jnUVU0CLfI9eKO2usNr4" Subject: Re: [Qemu-devel] [PATCH V3 3/7] qemu-nbd: add doc for internal snapshot export List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vT5PiWc8k6d34jnUVU0CLfI9eKO2usNr4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/25/2013 06:16 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > 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=3DSNAPSHOT_ID_OR_NAME\n" > +" load an internal snapshot inside FILE and expo= rt it\n" > +" as an read-only device\n" > +" -L, --load-snapshot1=3DSNAPSHOT_PARAM\n" > +" load an internal snapshot inside FILE and expo= rt it\n" > +" as an read-only device, SNAPSHOT_PARAM format = is\n" > +" 'snapshot.id=3D[ID],snapshot.name=3D[NAME]'\n"= Why can't ONE option be good enough? In other words, make the command line parser smart enough so that: --load-snapshot=3Dname tries SNAPSHOT_ID_OR_NAME, while --load-snapshot=3Dsnapshot.id=3Dxyz,snapshot.name=3Dname 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vT5PiWc8k6d34jnUVU0CLfI9eKO2usNr4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSSuDsAAoJEKeha0olJ0NqENIH/jUpxBF3ekG+e6EFunrWPDLp 3sl8WtzMJxor+HxcUnKhQkRIbuv3NWReTYVw2KZIXrlo08ptbS+A2TT+xT25i0zy yWKdMMPZspFQo7nMe4Fw4j9X+AbL4yQCGvuew7eKO2N4jgjtPM0IyxX1X8B+q69W 10NOU1E80vbiibfqdp3CcNkVymvWKQKf1XhoCICpB9egP8AXWoKB9mWYigPuyQbo 04U2BbuS3iVxg2VTVIBMTUuRQdiaGdLGm0CfZmXzTPpeKsaejyF5tmeBbVNAOcA2 pVPlaIfAmfJ1GOoyHn+a1C3KB7T5n4+UQp9WxOJWUqTOY5Omutt2oN9jbQ5qkjY= =b83f -----END PGP SIGNATURE----- --vT5PiWc8k6d34jnUVU0CLfI9eKO2usNr4--