[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 2/2] block: migrate callers from blk_by_name to blk_
From: |
Anton Kuchin |
Subject: |
[Qemu-block] [PATCH 2/2] block: migrate callers from blk_by_name to blk_lookup |
Date: |
Mon, 28 Jan 2019 17:27:48 +0300 |
Signed-off-by: Anton Kuchin <address@hidden>
---
blockdev-nbd.c | 2 +-
blockdev.c | 6 +++---
hmp.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index d73ac1b026..f2ea7318cf 100644
--- a/blockdev-nbd.c
+++ b/blockdev-nbd.c
@@ -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) {
diff --git a/blockdev.c b/blockdev.c
index a8fa8748a9..bb01c41038 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -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;
diff --git a/hmp.c b/hmp.c
index b2a2b1f84e..7b03d5c1d7 100644
--- a/hmp.c
+++ b/hmp.c
@@ -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) {
--
2.19.1