Some HMP and QMP commands are targeting BlockBackend but for hotplugged devices name of BB is deprecated, instead name of root BlockDriverState is set. These patches add functions to search BB by attached root BDS name.
This approach isn't perfect, but I couldn't invent a better one and I belive it's more convinient than accessing BB by QOM path. Anton Kuchin (2): block: add functions to search BlockBackend by root BDS name block: migrate callers from blk_by_name to blk_lookup block/block-backend.c | 29 +++++++++++++++++++++++++++++ blockdev-nbd.c | 2 +- blockdev.c | 6 +++--- hmp.c | 2 +- include/sysemu/block-backend.h | 7 +++++++ 5 files changed, 41 insertions(+), 5 deletions(-) -- 2.19.1