From 24fb4133001e1f54a526f0927837f30c1507169a Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Fri, 6 Nov 2015 16:27:06 +0100 Subject: qmp: Introduce blockdev-change-medium Introduce a new QMP command 'blockdev-change-medium' which is intended to replace the 'change' command for block devices. The existing function qmp_change_blockdev() is accordingly renamed to qmp_blockdev_change_medium(). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'blockdev.c') diff --git a/blockdev.c b/blockdev.c index 53d4edfe20..b3a958c4aa 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2143,8 +2143,9 @@ void qmp_blockdev_insert_medium(const char *device, const char *node_name, qmp_blockdev_insert_anon_medium(device, bs, errp); } -void qmp_change_blockdev(const char *device, const char *filename, - const char *format, Error **errp) +void qmp_blockdev_change_medium(const char *device, const char *filename, + bool has_format, const char *format, + Error **errp) { BlockBackend *blk; BlockDriverState *medium_bs = NULL; @@ -2165,7 +2166,7 @@ void qmp_change_blockdev(const char *device, const char *filename, bdrv_flags = blk_get_open_flags_from_root_state(blk); - if (format) { + if (has_format) { options = qdict_new(); qdict_put(options, "driver", qstring_from_str(format)); } -- cgit v1.2.3