diff mbox series

[03/13] char: Some QAPI aliases for CLI compatibility

Message ID 20201112175905.404472-4-kwolf@redhat.com (mailing list archive)
State New, archived
Headers show
Series char: QAPIfy the command line parsing | expand

Commit Message

Kevin Wolf Nov. 12, 2020, 5:58 p.m. UTC
For all chardev backend types where this is enough to achieve
compatibility with the old QemuOpts based command line parser, add
aliases to the QAPI schema.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 qapi/char.json | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/qapi/char.json b/qapi/char.json
index 14ee06a52d..91c0dbfa1e 100644
--- a/qapi/char.json
+++ b/qapi/char.json
@@ -227,7 +227,8 @@ 
   'data': { '*in': 'str',
             'out': 'str',
             '*append': 'bool' },
-  'base': 'ChardevCommon' }
+  'base': 'ChardevCommon',
+  'aliases': [ {'alias': 'path', 'source': ['out'] } ] }
 
 ##
 # @ChardevHostdev:
@@ -241,7 +242,8 @@ 
 ##
 { 'struct': 'ChardevHostdev',
   'data': { 'device': 'str' },
-  'base': 'ChardevCommon' }
+  'base': 'ChardevCommon',
+  'aliases': [ {'alias': 'path', 'source': ['device'] } ] }
 
 ##
 # @ChardevSocket:
@@ -342,7 +344,8 @@ 
 { 'struct': 'ChardevSpiceChannel',
   'data': { 'type': 'str' },
   'base': 'ChardevCommon',
-  'if': 'defined(CONFIG_SPICE)' }
+  'if': 'defined(CONFIG_SPICE)',
+  'aliases': [ {'alias': 'name', 'source': ['type'] } ] }
 
 ##
 # @ChardevSpicePort:
@@ -356,7 +359,8 @@ 
 { 'struct': 'ChardevSpicePort',
   'data': { 'fqdn': 'str' },
   'base': 'ChardevCommon',
-  'if': 'defined(CONFIG_SPICE)' }
+  'if': 'defined(CONFIG_SPICE)',
+  'aliases': [ {'alias': 'name', 'source': ['fqdn'] } ] }
 
 ##
 # @ChardevVC:
@@ -420,7 +424,8 @@ 
             'vc': 'ChardevVC',
             'ringbuf': 'ChardevRingbuf',
             # next one is just for compatibility
-            'memory': 'ChardevRingbuf' } }
+            'memory': 'ChardevRingbuf' },
+  'aliases': [ { 'source': ['data'] } ] }
 
 ##
 # @ChardevReturn: