From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzuRM-0000X9-Fl for qemu-devel@nongnu.org; Thu, 18 Jul 2013 16:04:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzuRL-00030T-Ea for qemu-devel@nongnu.org; Thu, 18 Jul 2013 16:04:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzuRL-00030N-5U for qemu-devel@nongnu.org; Thu, 18 Jul 2013 16:04:39 -0400 Message-ID: <51E84A4F.9030900@redhat.com> Date: Thu, 18 Jul 2013 14:04:31 -0600 From: Eric Blake MIME-Version: 1.0 References: <1372862071-28225-1-git-send-email-pbonzini@redhat.com> <1372862071-28225-13-git-send-email-pbonzini@redhat.com> In-Reply-To: <1372862071-28225-13-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="S4Fg7fd9gHRXDLQs1v7ncnWVBJKlUqaub" Subject: Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --S4Fg7fd9gHRXDLQs1v7ncnWVBJKlUqaub Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/03/2013 08:34 AM, Paolo Bonzini wrote: > This command dumps the metadata of an entire chain, in either tabular o= r JSON > format. >=20 > Signed-off-by: Paolo Bonzini > --- > qemu-img-cmds.hx | 6 ++ > qemu-img.c | 186 +++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 2 files changed, 192 insertions(+) >=20 > + case OFORMAT_JSON: > + printf("%s{ 'depth': %d, 'start': %lld, 'length': %lld, " > + "'zero': %s, 'data': %s", > + (e->start =3D=3D 0 ? "[" : ",\n"), > + e->depth, (long long) e->start, (long long) e->length, > + (e->flags & BDRV_BLOCK_ZERO) ? "true" : "false", > + (e->flags & BDRV_BLOCK_DATA) ? "true" : "false"); > + if (e->flags & BDRV_BLOCK_OFFSET_VALID) { > + printf(", 'offset': %lld", (long long) e->offset); > + } > + putchar('}'); Can we please get this format documented in qapi-schema.json, even if we aren't using qapi to generate it yet? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --S4Fg7fd9gHRXDLQs1v7ncnWVBJKlUqaub 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR6EpPAAoJEKeha0olJ0NqoP0IAKwqzWZnPgnnLRg7UT8I/w7q Bl5rEQN3qPOjXShIeHFjnlMGq88vFnC0HBOqgFUmilRAIgVuUrDABkElU1i7lKrc HsP0/4K6arPLkBLX1c2nxt+i+Fx0Fc6EhMlHFQGeqoj6Gh0YkSoLe57JP/0cPgiF VwIbKw68PYiIRYxg/I65PXDKEyzIiHX7abD+0Pd7bKkntOtBjoPT37yopUbA4WIp A6/EyTTC6zgoXZGadaRIl7fPbBQzH87tNv8pTyqwsPtMFKSNqfNK1bMzDOr0cmkd GsFUzLKlIB49XEnBD3ffuGw0BadTqG1RCSIE7/IBzxVDJhRmbvpJoW0k/XFdY9E= =sBa3 -----END PGP SIGNATURE----- --S4Fg7fd9gHRXDLQs1v7ncnWVBJKlUqaub--