From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1dUG-0007Yv-Di for qemu-devel@nongnu.org; Wed, 15 Aug 2012 09:18:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1dUF-00069r-0R for qemu-devel@nongnu.org; Wed, 15 Aug 2012 09:18:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1dUE-00069j-N0 for qemu-devel@nongnu.org; Wed, 15 Aug 2012 09:18:14 -0400 Message-ID: <502BA16A.90800@redhat.com> Date: Wed, 15 Aug 2012 07:17:30 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343384448-21828-1-git-send-email-xiawenc@linux.vnet.ibm.com> <87txwte2j0.fsf@codemonkey.ws> <20120815084943.GA2194@irqsave.net> In-Reply-To: <20120815084943.GA2194@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig6DD3D9E980D459B9C1F81BD1" Subject: Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Beno=EEt_Canet?= Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, Anthony Liguori , Wenchao Xia , stefanha@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6DD3D9E980D459B9C1F81BD1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 08/15/2012 02:49 AM, Beno=EEt Canet wrote: >> I think an --format=3Djson option would be a bit more extensible and >> better matches what most tools are doing these days. >=20 > The qemu-img info subcommand already use the "-f" short option. > What alternative could be use instead of --format=3Djson ? You are right that the mnemonic 'format' collides with -f and -F (rebase), and 'output' collides with -o and -O (convert). Maybe we could use the mnemonic '--layout=3Djson', since '-L' appears to be available? Or maybe '--machine=3Djson' with -m, to indicate that the output is machine-parseable (and where other machine-parseable layouts like xml might be added in the future)? Also, there's no rule that says that the short option must match the mnemonic of the long option; we could always go with the short option of '-j' even if the long option is spelled '--format', even if it means a theoretical addition of '--format=3Dxml' would map to the odd-looking '-j= xml'. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig6DD3D9E980D459B9C1F81BD1 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.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQK6FqAAoJEKeha0olJ0NqGL4H+wcar7KF8Lolp8aOZjA0kTsc irx/raZ/xNyapbOEXMyFqyhDbVTse9E1wBxwMk0XCrzTC8ht6tjThSKQk6crWuEC 6cEN4PRBr1IHgJhmUzp43JAzxkoUfo1w/sruAYMvI1EgxXeWf/ZZMBS0Ghb8kYXT ScWMhAB/EoVZfI92KB0F4TzZO+t8fwZVYS3EZ/nF8vYEEe0fLPosSMLi8emuWgtq u1X3nC9lP8dsie26SoEY2AdsnEeNsbY75Hq0H8ZqC+NAZXYMzy0WOj913AJIt354 vX9xRLnVh+LDyHyPq+x7EIXLJQLqmhq0CRh1VnU3AdjXQiqPLw3CdoSvkpWxaxg= =A+eN -----END PGP SIGNATURE----- --------------enig6DD3D9E980D459B9C1F81BD1--