From d5a8ee60a0fbc20a2c2d02f3bda1bb1bd365f1ee Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Fri, 17 Apr 2015 14:52:43 +0300 Subject: qmp: fill in the image field in BlockDeviceInfo The image field in BlockDeviceInfo is supposed to contain an ImageInfo object. However that is being filled in by bdrv_query_info(), not by bdrv_block_device_info(), which is where BlockDeviceInfo is actually created. Anyone calling bdrv_block_device_info() directly will get a null image field. As a consequence of this, the HMP command 'info block -n -v' crashes QEMU. This patch moves the code that fills in that field from bdrv_query_info() to bdrv_block_device_info(). Signed-off-by: Alberto Garcia Message-id: 1429271563-3765-1-git-send-email-berto@igalia.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'blockdev.c') diff --git a/blockdev.c b/blockdev.c index e67c701879..a136b2ed47 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2392,7 +2392,7 @@ out: BlockDeviceInfoList *qmp_query_named_block_nodes(Error **errp) { - return bdrv_named_nodes_list(); + return bdrv_named_nodes_list(errp); } void qmp_blockdev_backup(const char *device, const char *target, -- cgit v1.2.3-55-g7522