Received: from eggs.gnu.org ([2001:4830:134:3::10]:50399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQetJ-0001ct-Dm for qemu-devel@nongnu.org; Tue, 02 Feb 2016 12:37:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQetI-0000Pn-IJ for qemu-devel@nongnu.org; Tue, 02 Feb 2016 12:37:25 -0500 From: Max Reitz Date: Tue, 2 Feb 2016 18:35:39 +0100 Message-Id: <1454434543-25963-47-git-send-email-mreitz@redhat.com> In-Reply-To: <1454434543-25963-1-git-send-email-mreitz@redhat.com> References: <1454434543-25963-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PULL v2 46/50] qemu-img: In "map", use the returned "file" from bdrv_get_block_status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, Max Reitz From: Fam Zheng 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(-) diff --git a/qemu-img.c b/qemu-img.c index e653b2f..c8bc63f 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; } -- 2.7.0