aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-01-26 11:59:01 +0800
committerMax Reitz <mreitz@redhat.com>2016-02-02 17:50:47 +0100
commit9e4303400801e62e8e357decdb487834582459e8 (patch)
tree0ff877e62094b5fc438213263a747b1be61de258 /qemu-img.c
parentac987b30d0a97f14b82584921fc5ab3cd88c431b (diff)
qemu-img: In "map", use the returned "file" from bdrv_get_block_status
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> Message-id: 1453780743-16806-15-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c
index e653b2f304..c8bc63f0a0 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2236,7 +2236,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;
}