hmp: Add read-only-mode option to change command

Expose the new read-only-mode option of 'blockdev-change-medium' for the
'change' HMP command.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz
2015-10-26 21:39:18 +01:00
committed by Kevin Wolf
parent 39ff43d9e1
commit baead0abef
2 changed files with 38 additions and 4 deletions

View File

@ -194,8 +194,8 @@ ETEXI
{
.name = "change",
.args_type = "device:B,target:F,arg:s?",
.params = "device filename [format]",
.args_type = "device:B,target:F,arg:s?,read-only-mode:s?",
.params = "device filename [format [read-only-mode]]",
.help = "change a removable medium, optional format",
.mhandler.cmd = hmp_change,
},
@ -206,7 +206,7 @@ STEXI
Change the configuration of a device.
@table @option
@item change @var{diskdevice} @var{filename} [@var{format}]
@item change @var{diskdevice} @var{filename} [@var{format} [@var{read-only-mode}]]
Change the medium for a removable disk device to point to @var{filename}. eg
@example
@ -215,6 +215,20 @@ Change the medium for a removable disk device to point to @var{filename}. eg
@var{format} is optional.
@var{read-only-mode} may be used to change the read-only status of the device.
It accepts the following values:
@table @var
@item retain
Retains the current status; this is the default.
@item read-only
Makes the device read-only.
@item read-write
Makes the device writable.
@end table
@item change vnc @var{display},@var{options}
Change the configuration of the VNC server. The valid syntax for @var{display}
and @var{options} are described at @ref{sec_invocation}. eg