mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: Accept device model name for blockdev-change-medium
In order to remove the need for BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts blockdev-change-medium to accept a qdev device name. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
fbe2d8163e
commit
70e2cb3bd7
6 changed files with 31 additions and 18 deletions
5
hmp.c
5
hmp.c
|
@ -1422,8 +1422,9 @@ void hmp_change(Monitor *mon, const QDict *qdict)
|
|||
}
|
||||
}
|
||||
|
||||
qmp_blockdev_change_medium(device, target, !!arg, arg,
|
||||
!!read_only, read_only_mode, &err);
|
||||
qmp_blockdev_change_medium(true, device, false, NULL, target,
|
||||
!!arg, arg, !!read_only, read_only_mode,
|
||||
&err);
|
||||
if (err &&
|
||||
error_get_class(err) == ERROR_CLASS_DEVICE_ENCRYPTED) {
|
||||
error_free(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue