qapi/char: Make backend types properly conditional
commit563799f6c08ac17607348bc82fade15c0d13b7e4
authorMarkus Armbruster <armbru@redhat.com>
Sat, 3 Feb 2024 08:02:27 +0000 (3 09:02 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 14 Feb 2024 06:45:08 +0000 (14 07:45 +0100)
tree7f5035c1797cffaca2073233c627502d3668adb3
parentf396da77ca59cc67fedb54fe4ea22fbb961270d3
qapi/char: Make backend types properly conditional

Character backends are actually QOM types.  When a backend's
compile-time conditional QOM type is not compiled in, creation fails
with "'FOO' is not a valid char driver name".  Okay, except
introspecting chardev-add with query-qmp-schema doesn't work then: the
backend type is there even though the QOM type isn't.

A management application can work around this issue by using
qom-list-types instead.

Fix the issue anyway: add the conditionals to the QAPI schema.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240203080228.2766159-4-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
qapi/char.json