[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output |
Date: |
Wed, 15 Aug 2012 07:17:30 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 08/15/2012 02:49 AM, Benoît Canet wrote:
>> I think an --format=json option would be a bit more extensible and
>> better matches what most tools are doing these days.
>
> The qemu-img info subcommand already use the "-f" short option.
> What alternative could be use instead of --format=json ?
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=json', since '-L' appears to be
available? Or maybe '--machine=json' 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=xml' would map to the odd-looking '-j
xml'.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature