On Fri 17 Apr 2015 01:52:43 PM CEST, Alberto Garcia <be...@igalia.com> wrote:
> 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(). And in case this change is too big/risky for 2.3, there's also the simple workaround for the crash: --- a/hmp.c +++ b/hmp.c @@ -391,7 +391,7 @@ static void print_block_info(Monitor *mon, BlockInfo *info, inserted->iops_size); } - if (verbose) { + if (verbose && inserted->image) { monitor_printf(mon, "\nImages:\n"); image_info = inserted->image; while (1) { Berto