From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCXmo-0003eI-B2 for qemu-devel@nongnu.org; Mon, 13 Jun 2016 15:44:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCXmm-0006MK-7F for qemu-devel@nongnu.org; Mon, 13 Jun 2016 15:44:37 -0400 References: <1465837105-11206-1-git-send-email-den@openvz.org> <1465837105-11206-6-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <575F0D1C.4060909@redhat.com> Date: Mon, 13 Jun 2016 13:44:28 -0600 MIME-Version: 1.0 In-Reply-To: <1465837105-11206-6-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vBQfnPK7pigucHLkoOnelwkjcMVxqhlvh" Subject: Re: [Qemu-devel] [PATCH 5/6] qemu-img: move common options parsing before commands processing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: Paolo Bonzini , Stefan Hajnoczi , Kevin Wolf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vBQfnPK7pigucHLkoOnelwkjcMVxqhlvh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/13/2016 10:58 AM, Denis V. Lunev wrote: > This is necessary to enable creation of common qemu-img options which w= ill > be specified before command. >=20 > The patch also enables '-V' alias to '--version' (exactly like in other= > block utilities) and documents this change. >=20 > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Paolo Bonzini > CC: Stefan Hajnoczi > CC: Kevin Wolf > --- > qemu-img.c | 39 ++++++++++++++++++++++++++------------- > qemu-img.texi | 10 +++++++++- > 2 files changed, 35 insertions(+), 14 deletions(-) >=20 > diff --git a/qemu-img.c b/qemu-img.c > index 4b56ad3..d22ebdf 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -87,9 +87,12 @@ static void QEMU_NORETURN help(void) > { > const char *help_msg =3D > QEMU_IMG_VERSION > - "usage: qemu-img command [command options]\n" > + "usage: qemu-img [standard options] command [command option= s]\n" > "QEMU disk image utility\n" > "\n" > + " '-h', '--help' display this help and exit\n" > + " '-V', '--version' output version information and ex= it\n" > + "\n" > "Command syntax:\n" > #define DEF(option, callback, arg_string) \ > " " arg_string "\n" > @@ -3476,7 +3479,7 @@ int main(int argc, char **argv) > int c; > static const struct option long_options[] =3D { > {"help", no_argument, 0, 'h'}, > - {"version", no_argument, 0, 'v'}, > + {"version", no_argument, 0, 'V'}, I guess it doesn't hurt to change to '-V', since neither '-v' nor '-V' worked prior to the patch. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vBQfnPK7pigucHLkoOnelwkjcMVxqhlvh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXXw0cAAoJEKeha0olJ0Nq3y4H/Ap0BYq1GHbeQ89jDkA8fZ0N XHAu+3UTdNelhfcyaCxrN9iv+neOB/6KMFdaonbZhpJSsDvrOFH1Mq8aLftuqYd2 RgxsTIBcPezjChtd7fHLc8UcmJ/VYYo8HyczD4HMBpiK6HhrQ7pU2TLMY5/ecF1o W11Q1vDGJOY68BDoCPNDAOXjH2tPYpm1i61OyDdfMMokNMwn7MY87kGXjTtmjSAY YPbmuuXzrN0P1CgNqT3wkOvW1DJgfLqOva9sZbKG2gz6oJl0dp17TM8mmrZVwFkU uopsN1Qg1yGM8G7Z6yI5pBoDn8lj36Mft1gZYBiMvNSexn26aRZPy8U9kRiWDGI= =X2sS -----END PGP SIGNATURE----- --vBQfnPK7pigucHLkoOnelwkjcMVxqhlvh--