From 9e4303400801e62e8e357decdb487834582459e8 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 26 Jan 2016 11:59:01 +0800 Subject: 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 Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-15-git-send-email-famz@redhat.com Signed-off-by: Max Reitz --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qemu-img.c') 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; } -- cgit v1.2.3