qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER
When building QEMU with --disable-vhost-user and using introspection,
query-qmp-schema lists vhost-user-blk even though it's not actually
available:
{ "execute": "query-qmp-schema" }
{
"return": [
...
{
"name": "312",
"members": [
{
"name": "nbd"
},
{
"name": "vhost-user-blk"
}
],
"meta-type": "enum",
"values": [
"nbd",
"vhost-user-blk"
]
},
Restrict vhost-user-blk in BlockExportType when
CONFIG_VHOST_USER_BLK_SERVER is disabled, so it
doesn't end listed by query-qmp-schema.
Fixes: 90fc91d50b
("convert vhost-user-blk server to block export API")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220107105420.395011-4-f4bug@amsat.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
c8cbc95242
commit
bb01ea7311
@ -277,7 +277,8 @@
|
|||||||
# Since: 4.2
|
# Since: 4.2
|
||||||
##
|
##
|
||||||
{ 'enum': 'BlockExportType',
|
{ 'enum': 'BlockExportType',
|
||||||
'data': [ 'nbd', 'vhost-user-blk',
|
'data': [ 'nbd',
|
||||||
|
{ 'name': 'vhost-user-blk', 'if': 'CONFIG_VHOST_USER_BLK_SERVER' },
|
||||||
{ 'name': 'fuse', 'if': 'CONFIG_FUSE' } ] }
|
{ 'name': 'fuse', 'if': 'CONFIG_FUSE' } ] }
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -319,7 +320,8 @@
|
|||||||
'discriminator': 'type',
|
'discriminator': 'type',
|
||||||
'data': {
|
'data': {
|
||||||
'nbd': 'BlockExportOptionsNbd',
|
'nbd': 'BlockExportOptionsNbd',
|
||||||
'vhost-user-blk': 'BlockExportOptionsVhostUserBlk',
|
'vhost-user-blk': { 'type': 'BlockExportOptionsVhostUserBlk',
|
||||||
|
'if': 'CONFIG_VHOST_USER_BLK_SERVER' },
|
||||||
'fuse': { 'type': 'BlockExportOptionsFuse',
|
'fuse': { 'type': 'BlockExportOptionsFuse',
|
||||||
'if': 'CONFIG_FUSE' }
|
'if': 'CONFIG_FUSE' }
|
||||||
} }
|
} }
|
||||||
|
Loading…
Reference in New Issue
Block a user