aboutsummaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2015-11-11 04:49:44 +0100
committerKevin Wolf <kwolf@redhat.com>2015-11-11 16:23:34 +0100
commit39ff43d9e1f42b1d829a955e546cddab87ac0626 (patch)
tree40a4f937d8fe47ab085bf7950253c348a941e3d2 /qmp.c
parent1068674927a08cb9f535946abe2f91529b13160c (diff)
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 <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c3
1 files changed, 2 insertions, 1 deletions
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);
}
}