diff options
author | Fam Zheng <famz@redhat.com> | 2015-03-02 19:36:46 +0800 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2015-03-16 12:10:30 -0400 |
commit | 5560625badb9e710577986de65ff4e4b413729a0 (patch) | |
tree | 3cc580dd905e2f24a2aa664ce727176615c50381 /monitor.c | |
parent | 4b4d7b072f0faf9008ca835af101338857b28394 (diff) |
monitor: Convert bdrv_find to blk_by_name
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1425296209-1476-2-git-send-email-famz@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -73,6 +73,7 @@ #include "block/qapi.h" #include "qapi/qmp-event.h" #include "qapi-event.h" +#include "sysemu/block-backend.h" /* for hmp_info_irq/pic */ #if defined(TARGET_SPARC) @@ -5414,15 +5415,15 @@ int monitor_read_block_device_key(Monitor *mon, const char *device, BlockCompletionFunc *completion_cb, void *opaque) { - BlockDriverState *bs; + BlockBackend *blk; - bs = bdrv_find(device); - if (!bs) { + blk = blk_by_name(device); + if (!blk) { monitor_printf(mon, "Device not found %s\n", device); return -1; } - return monitor_read_bdrv_key_start(mon, bs, completion_cb, opaque); + return monitor_read_bdrv_key_start(mon, blk_bs(blk), completion_cb, opaque); } QemuOptsList qemu_mon_opts = { |