@@ -918,6 +918,9 @@ QemuOptsList qemu_chardev_opts = {
},{
.name = "mux",
.type = QEMU_OPT_BOOL,
+ },{
+ .name = "mux-be-id",
+ .type = QEMU_OPT_STRING,
},{
.name = "signal",
.type = QEMU_OPT_BOOL,
@@ -232,6 +232,7 @@ OBJECT_DECLARE_TYPE(Chardev, ChardevClass, CHARDEV)
#define TYPE_CHARDEV_NULL "chardev-null"
#define TYPE_CHARDEV_MUX "chardev-mux"
+#define TYPE_CHARDEV_MUX_BE "chardev-mux-be"
#define TYPE_CHARDEV_RINGBUF "chardev-ringbuf"
#define TYPE_CHARDEV_PTY "chardev-pty"
#define TYPE_CHARDEV_CONSOLE "chardev-console"
@@ -199,11 +199,15 @@
# @logappend: true to append instead of truncate (default to false to
# truncate)
#
+# @mux-be-id: id of the mux-be device for backend multiplexing
+# (since: 9.2)
+#
# Since: 2.6
##
{ 'struct': 'ChardevCommon',
'data': { '*logfile': 'str',
- '*logappend': 'bool' } }
+ '*logappend': 'bool',
+ '*mux-be-id': 'str' } }
##
# @ChardevFile:
@@ -440,6 +444,8 @@
#
# @mux: Since 1.5
#
+# @mux-be: Since 9.2
+#
# @msmouse: Since 1.5
#
# @wctablet: Since 2.9
@@ -482,6 +488,7 @@
'pty',
'null',
'mux',
+ 'mux-be',
'msmouse',
'wctablet',
{ 'name': 'braille', 'if': 'CONFIG_BRLAPI' },
Patch introduces `mux-be-id=ID` option for all chardev devices and TYPE_CHARDEV_MUX_BE type for distinction different types of multiplexers: frontend (current "mux" type) and backend (new "mux-be" type). Actual attach of the chardev to the multiplexer and mux-be implementation will follow. Signed-off-by: Roman Penyaev <r.peniaev@gmail.com> Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> Cc: qemu-devel@nongnu.org --- chardev/char.c | 3 +++ include/chardev/char.h | 1 + qapi/char.json | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-)