aboutsummaryrefslogtreecommitdiff
path: root/hmp-commands.hx
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-12-17 15:13:34 +0100
committerKevin Wolf <kwolf@redhat.com>2019-12-19 18:04:25 +0100
commit89b6fc45614bb45dcd58f1590415afe5c2791abd (patch)
tree3f1de174742b60342e52dcc4d98261777392be10 /hmp-commands.hx
parent7bb4941ace471fc7dd6ded4749b95b9622baa6ed (diff)
hmp: Allow using qdev ID for qemu-io command
In order to issue requests on an existing BlockBackend with the 'qemu-io' HMP command, allow specifying the BlockBackend not only with a BlockBackend name, but also with a qdev ID/QOM path for a device that owns the (possibly anonymous) BlockBackend. Because qdev names could be conflicting with BlockBackend and node names, introduce a -d option to explicitly address a device. If the option is not given, a BlockBackend or a node is addressed. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hmp-commands.hx')
-rw-r--r--hmp-commands.hx8
1 files changed, 5 insertions, 3 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index cfcc044ce4..dc23185de4 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1875,9 +1875,11 @@ ETEXI
{
.name = "qemu-io",
- .args_type = "device:B,command:s",
- .params = "[device] \"[command]\"",
- .help = "run a qemu-io command on a block device",
+ .args_type = "qdev:-d,device:B,command:s",
+ .params = "[-d] [device] \"[command]\"",
+ .help = "run a qemu-io command on a block device\n\t\t\t"
+ "-d: [device] is a device ID rather than a "
+ "drive ID or node name",
.cmd = hmp_qemu_io,
},