aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-07-11 13:27:38 +0200
committerKevin Wolf <kwolf@redhat.com>2017-07-18 15:14:35 +0200
commit46eade7be83c110659ea9a6883fbd898d455ec06 (patch)
treec5f8fc27e2eaf478743d3f1a4ee1607c1e63eb03 /qapi
parent77beef8365ef797c95e49d87f07ed5d60d583594 (diff)
block/qapi: Add qdev device name to query-block
With -blockdev/-device, users can indirectly create anonymous BlockBackends, while the state of such backends is still of interest. As a preparation for making such BBs visible in query-block, make sure that they can be identified even without a name by adding the ID/QOM path of their qdev device to BlockInfo. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json9
1 files changed, 8 insertions, 1 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index c437aa50ef..ff8e2ba0cb 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -457,6 +457,9 @@
#
# @device: The device name associated with the virtual device.
#
+# @qdev: The qdev ID, or if no ID is assigned, the QOM path of the block
+# device. (since 2.10)
+#
# @type: This field is returned only for compatibility reasons, it should
# not be used (always returns 'unknown')
#
@@ -482,7 +485,7 @@
# Since: 0.14.0
##
{ 'struct': 'BlockInfo',
- 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
+ 'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool',
'locked': 'bool', '*inserted': 'BlockDeviceInfo',
'*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
'*dirty-bitmaps': ['BlockDirtyInfo'] } }
@@ -577,6 +580,7 @@
# }
# }
# },
+# "qdev": "ide_disk",
# "type":"unknown"
# },
# {
@@ -584,12 +588,15 @@
# "device":"ide1-cd0",
# "locked":false,
# "removable":true,
+# "qdev": "/machine/unattached/device[23]",
+# "tray_open": false,
# "type":"unknown"
# },
# {
# "device":"floppy0",
# "locked":false,
# "removable":true,
+# "qdev": "/machine/unattached/device[20]",
# "type":"unknown"
# },
# {