From 39ff43d9e1f42b1d829a955e546cddab87ac0626 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 11 Nov 2015 04:49:44 +0100 Subject: blockdev: read-only-mode for blockdev-change-medium Add an option to qmp_blockdev_change_medium() which allows changing the read-only status of the block device whose medium is changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently of the drive. Some users may find it useful to be able to therefore change the read-only status of a block device when changing the medium. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- qmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qmp.c') diff --git a/qmp.c b/qmp.c index 4e44f98e9d..ddc63ea9f6 100644 --- a/qmp.c +++ b/qmp.c @@ -414,7 +414,8 @@ void qmp_change(const char *device, const char *target, if (strcmp(device, "vnc") == 0) { qmp_change_vnc(target, has_arg, arg, errp); } else { - qmp_blockdev_change_medium(device, target, has_arg, arg, errp); + qmp_blockdev_change_medium(device, target, has_arg, arg, false, 0, + errp); } } -- cgit v1.2.3