qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output
Date: Fri, 27 Jul 2012 12:49:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

Il 27/07/2012 12:33, Daniel P. Berrange ha scritto:
>  #qemu-img info -j /var/lib/libvirt/images/bar.qcow2
>  {
>     "information": {
>         "actual_size": "139264",
>         "fmt": "qcow2",
>         "virtual_size": "10485760",
>         "filename": "/var/lib/libvirt/images/bar.qcow2",
>         "cluster_size": 65536,
>         "encrypted": 0,
>         "snapshot_list": [
>         ],
>         "dirty_flag": 0,
>         "backing_filename": "/dev/sda1"
>     },
>     "return": 0
>  }
> 
> IIUC,the 'return' element here is just duplicating the qemu-img
> exit status. I think this is rather dubious, and would rather
> just see the stuff in the 'information' sub-block be output
> directly. It also seems to forget to mention the backing
> file format.

I wonder if we could add this also to the QEMU monitor ("info
block-image foo"), so that the code would be shared between qemu-img.c
and QEMU.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]