You need to sign in or sign up before continuing.
提交 5560625b 编写于 作者: F Fam Zheng 提交者: Max Reitz

monitor: Convert bdrv_find to blk_by_name

Signed-off-by: NFam Zheng <famz@redhat.com>
Message-id: 1425296209-1476-2-git-send-email-famz@redhat.com
Reviewed-by: NMax Reitz <mreitz@redhat.com>
Signed-off-by: NMax Reitz <mreitz@redhat.com>
上级 4b4d7b07
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#include "block/qapi.h" #include "block/qapi.h"
#include "qapi/qmp-event.h" #include "qapi/qmp-event.h"
#include "qapi-event.h" #include "qapi-event.h"
#include "sysemu/block-backend.h"
/* for hmp_info_irq/pic */ /* for hmp_info_irq/pic */
#if defined(TARGET_SPARC) #if defined(TARGET_SPARC)
...@@ -5414,15 +5415,15 @@ int monitor_read_block_device_key(Monitor *mon, const char *device, ...@@ -5414,15 +5415,15 @@ int monitor_read_block_device_key(Monitor *mon, const char *device,
BlockCompletionFunc *completion_cb, BlockCompletionFunc *completion_cb,
void *opaque) void *opaque)
{ {
BlockDriverState *bs; BlockBackend *blk;
bs = bdrv_find(device); blk = blk_by_name(device);
if (!bs) { if (!blk) {
monitor_printf(mon, "Device not found %s\n", device); monitor_printf(mon, "Device not found %s\n", device);
return -1; 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 = { QemuOptsList qemu_mon_opts = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册