From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: pbonzini@redhat.com, Wenchao Xia <xiawenc@linux.vnet.ibm.com>,
stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output
Date: Wed, 15 Aug 2012 10:49:43 +0200 [thread overview]
Message-ID: <20120815084943.GA2194@irqsave.net> (raw)
In-Reply-To: <87txwte2j0.fsf@codemonkey.ws>
Le Friday 27 Jul 2012 à 08:50:43 (-0500), Anthony Liguori a écrit :
> Wenchao Xia <xiawenc@linux.vnet.ibm.com> writes:
>
> > This patch would add option -j in qemu-img info command, which
> > would generate json output in stdout.
>
> This is a great idea.
>
> >
> > Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> > ---
> > qemu-img.c | 306 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
> > 1 files changed, 264 insertions(+), 42 deletions(-)
> >
> > diff --git a/qemu-img.c b/qemu-img.c
> > index 80cfb9b..a514c17 100644
> > --- a/qemu-img.c
> > +++ b/qemu-img.c
> > @@ -33,6 +33,9 @@
> > #include <windows.h>
> > #endif
> >
> > +#include "qint.h"
> > +#include "qjson.h"
> > +
> > typedef struct img_cmd_t {
> > const char *name;
> > int (*handler)(int argc, char **argv);
> > @@ -84,6 +87,7 @@ static void help(void)
> > " '-p' show progress of command (only certain commands)\n"
> > " '-S' indicates the consecutive number of bytes that must contain only zeros\n"
> > " for qemu-img to create a sparse image during conversion\n"
> > + " '-j' try get json output, which would be in stdout,
> > only valid in info command\n"
>
> 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 ?
Benoît
next prev parent reply other threads:[~2012-08-15 8:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 10:20 [Qemu-devel] [PATCH] let qemu-img info genereate json output Wenchao Xia
2012-07-27 10:33 ` Daniel P. Berrange
2012-07-27 10:49 ` Paolo Bonzini
2012-07-27 10:52 ` Daniel P. Berrange
2012-07-27 13:52 ` Anthony Liguori
2012-07-27 13:50 ` Anthony Liguori
2012-08-15 8:49 ` Benoît Canet [this message]
2012-08-15 13:17 ` Eric Blake
2012-07-30 14:34 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120815084943.GA2194@irqsave.net \
--to=benoit.canet@irqsave.net \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
--cc=xiawenc@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).