[PULL,30/33] qemu-img: fix invalid JSON

Submitted by Kevin Wolf on Sept. 13, 2013, 11:51 a.m.

Details

Message ID 1379073063-14963-31-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

Kevin Wolf Sept. 13, 2013, 11:51 a.m.
From: Paolo Bonzini <pbonzini@redhat.com>

Single quotes for JSON are a QMP-ism, use real JSON in
qemu-img output.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/qemu-img.c b/qemu-img.c
index 6a1ba69..926f0a0 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1839,7 +1839,7 @@  static void dump_map_entry(OutputFormat output_format, MapEntry *e,
                (e->flags & BDRV_BLOCK_ZERO) ? "true" : "false",
                (e->flags & BDRV_BLOCK_DATA) ? "true" : "false");
         if (e->flags & BDRV_BLOCK_OFFSET_VALID) {
-            printf(", 'offset': %"PRId64"", e->offset);
+            printf(", \"offset\": %"PRId64"", e->offset);
         }
         putchar('}');