qapi: make 'if' condition strings simple identifiers
Change the 'if' condition strings to be C-agnostic. It will accept '[A-Z][A-Z0-9_]*' identifiers. This allows to express configuration conditions in other languages (Rust or Python for ex) or other more suitable forms. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: John Snow <jsnow@redhat.com> Message-Id: <20210804083105.97531-11-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Rebased with semantic conflict in redefined-event.json] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
committed by
Markus Armbruster
parent
2b7d214536
commit
8a9f1e1d9c
@@ -342,7 +342,7 @@
|
||||
{ 'struct': 'ChardevSpiceChannel',
|
||||
'data': { 'type': 'str' },
|
||||
'base': 'ChardevCommon',
|
||||
'if': 'defined(CONFIG_SPICE)' }
|
||||
'if': 'CONFIG_SPICE' }
|
||||
|
||||
##
|
||||
# @ChardevSpicePort:
|
||||
@@ -356,7 +356,7 @@
|
||||
{ 'struct': 'ChardevSpicePort',
|
||||
'data': { 'fqdn': 'str' },
|
||||
'base': 'ChardevCommon',
|
||||
'if': 'defined(CONFIG_SPICE)' }
|
||||
'if': 'CONFIG_SPICE' }
|
||||
|
||||
##
|
||||
# @ChardevVC:
|
||||
@@ -405,7 +405,7 @@
|
||||
'data': { '*mouse': 'bool',
|
||||
'*clipboard': 'bool' },
|
||||
'base': 'ChardevCommon',
|
||||
'if': 'defined(CONFIG_SPICE_PROTOCOL)' }
|
||||
'if': 'CONFIG_SPICE_PROTOCOL' }
|
||||
|
||||
##
|
||||
# @ChardevBackend:
|
||||
@@ -431,11 +431,11 @@
|
||||
'stdio': 'ChardevStdio',
|
||||
'console': 'ChardevCommon',
|
||||
'spicevmc': { 'type': 'ChardevSpiceChannel',
|
||||
'if': 'defined(CONFIG_SPICE)' },
|
||||
'if': 'CONFIG_SPICE' },
|
||||
'spiceport': { 'type': 'ChardevSpicePort',
|
||||
'if': 'defined(CONFIG_SPICE)' },
|
||||
'if': 'CONFIG_SPICE' },
|
||||
'qemu-vdagent': { 'type': 'ChardevQemuVDAgent',
|
||||
'if': 'defined(CONFIG_SPICE_PROTOCOL)' },
|
||||
'if': 'CONFIG_SPICE_PROTOCOL' },
|
||||
'vc': 'ChardevVC',
|
||||
'ringbuf': 'ChardevRingbuf',
|
||||
# next one is just for compatibility
|
||||
|
||||
Reference in New Issue
Block a user