mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
1068674927
commit
39ff43d9e1
6 changed files with 72 additions and 4 deletions
3
qmp.c
3
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue