blockdev: Add blockdev-insert-medium

And a helper function for that, which directly takes a pointer to the
BDS to be inserted instead of its node-name (which will be used for
implementing 'change' using blockdev-insert-medium).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Max Reitz 2015-10-26 21:39:11 +01:00 committed by Kevin Wolf
parent 2814f67271
commit d129988289
3 changed files with 110 additions and 0 deletions

View file

@ -1940,6 +1940,23 @@
{ 'command': 'blockdev-remove-medium',
'data': { 'device': 'str' } }
##
# @blockdev-insert-medium:
#
# Inserts a medium (a block driver state tree) into a block device. That block
# device's tray must currently be open (unless there is no attached guest
# device) and there must be no medium inserted already.
#
# @device: block device name
#
# @node-name: name of a node in the block driver state graph
#
# Since: 2.5
##
{ 'command': 'blockdev-insert-medium',
'data': { 'device': 'str',
'node-name': 'str'} }
##
# @BlockErrorAction