From 46eade7be83c110659ea9a6883fbd898d455ec06 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 11 Jul 2017 13:27:38 +0200 Subject: block/qapi: Add qdev device name to query-block With -blockdev/-device, users can indirectly create anonymous BlockBackends, while the state of such backends is still of interest. As a preparation for making such BBs visible in query-block, make sure that they can be identified even without a name by adding the ID/QOM path of their qdev device to BlockInfo. Signed-off-by: Kevin Wolf Reviewed-by: John Snow --- hmp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index b42ae59a29..0e57f47682 100644 --- a/hmp.c +++ b/hmp.c @@ -425,6 +425,9 @@ static void print_block_info(Monitor *mon, BlockInfo *info, } if (info) { + if (info->has_qdev) { + monitor_printf(mon, " Attached to: %s\n", info->qdev); + } if (info->has_io_status && info->io_status != BLOCK_DEVICE_IO_STATUS_OK) { monitor_printf(mon, " I/O status: %s\n", BlockDeviceIoStatus_lookup[info->io_status]); -- cgit 1.4.1