aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c7
1 files changed, 4 insertions, 3 deletions
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));
}