diff mbox

[v6,13/15] qemu-img: In "map", use the returned "file" from bdrv_get_block_status

Message ID 1452218894-2388-14-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng Jan. 8, 2016, 2:08 a.m. UTC
Now all drivers should return a correct "file", we can make use of it,
even with the recursion into backing chain above.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/qemu-img.c b/qemu-img.c
index ac4eee5..a35edee 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2225,7 +2225,7 @@  static int get_block_status(BlockDriverState *bs, int64_t sector_num,
     e->flags = ret & ~BDRV_BLOCK_OFFSET_MASK;
     e->offset = ret & BDRV_BLOCK_OFFSET_MASK;
     e->depth = depth;
-    e->bs = bs;
+    e->bs = file;
     return 0;
 }