[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/13] char: Some QAPI aliases for CLI compatibility
|
From: |
Kevin Wolf |
|
Subject: |
[PATCH 03/13] char: Some QAPI aliases for CLI compatibility |
|
Date: |
Thu, 12 Nov 2020 18:58:55 +0100 |
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 --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:
--
2.28.0
- [PATCH 00/13] char: QAPIfy the command line parsing, Kevin Wolf, 2020/11/12
- [PATCH 01/13] char: Factor out qemu_chr_print_types(), Kevin Wolf, 2020/11/12
- [PATCH 03/13] char: Some QAPI aliases for CLI compatibility,
Kevin Wolf <=
- [PATCH 02/13] char: Add ChardevOptions and qemu_chr_new_cli(), Kevin Wolf, 2020/11/12
- [PATCH 04/13] char: Add qemu_chr_translate_legacy_options(), Kevin Wolf, 2020/11/12
- [PATCH 05/13] char-socket: Implement compat code for CLI QAPIfication, Kevin Wolf, 2020/11/12
- [PATCH 06/13] char-udp: Implement compat code for CLI QAPIfication, Kevin Wolf, 2020/11/12
- [PATCH 07/13] char: Add qemu_chr_parse_cli_dict/str(), Kevin Wolf, 2020/11/12
- [PATCH 08/13] char: Add mux option to ChardevOptions, Kevin Wolf, 2020/11/12
- [PATCH 09/13] qemu-storage-daemon: QAPIfy --chardev, Kevin Wolf, 2020/11/12