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>
master
Fam Zheng 2016-01-26 11:59:01 +08:00 committed by Max Reitz
parent ac987b30d0
commit 9e43034008
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}