Blob Blame History Raw
From 7805c18f11162994f870271080ab0848759a6d07 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 18 Oct 2013 08:14:48 +0200
Subject: [PATCH 23/81] qemu-img: fix invalid JSON

RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Message-id: <1382084091-16636-24-git-send-email-pbonzini@redhat.com>
Patchwork-id: 55006
O-Subject: [RHEL 7.0 qemu-kvm PATCH 23/26] qemu-img: fix invalid JSON
Bugzilla: 989646
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Max Reitz <mreitz@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@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>
(cherry picked from commit c745bfb4300206280ce6156b4bafe765f610057c)
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 qemu-img.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index e58c052..3a59bf0 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1960,7 +1960,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('}');
 
-- 
1.7.1