@@ -162,7 +162,7 @@ void qmp_nbd_server_add(const char *device, bool has_name, const char *name,
return;
}
- on_eject_blk = blk_by_name(device);
+ on_eject_blk = blk_lookup(device);
bs = bdrv_lookup_bs(device, device, errp);
if (!bs) {
@@ -1082,7 +1082,7 @@ void hmp_commit(Monitor *mon, const QDict *qdict)
BlockDriverState *bs;
AioContext *aio_context;
- blk = blk_by_name(device);
+ blk = blk_lookup(device);
if (!blk) {
monitor_printf(mon, "Device '%s' not found\n", device);
return;
@@ -3066,7 +3066,7 @@ void hmp_drive_del(Monitor *mon, const QDict *qdict)
return;
}
- blk = blk_by_name(id);
+ blk = blk_lookup(id);
if (!blk) {
error_report("Device '%s' not found", id);
return;
@@ -4431,7 +4431,7 @@ void qmp_x_block_latency_histogram_set(
bool has_boundaries_flush, uint64List *boundaries_flush,
Error **errp)
{
- BlockBackend *blk = blk_by_name(device);
+ BlockBackend *blk = blk_lookup(device);
BlockAcctStats *stats;
int ret;
@@ -2460,7 +2460,7 @@ void hmp_qemu_io(Monitor *mon, const QDict *qdict)
Error *err = NULL;
int ret;
- blk = blk_by_name(device);
+ blk = blk_lookup(device);
if (!blk) {
BlockDriverState *bs = bdrv_lookup_bs(NULL, device, &err);
if (bs) {
Signed-off-by: Anton Kuchin <antonkuchin@yandex-team.ru> --- blockdev-nbd.c | 2 +- blockdev.c | 6 +++--- hmp.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)