diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-07-18 11:05:57 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-07-23 13:57:52 +0200 |
commit | 25b1ef31db30a7dace4d3a485f0a3b3c7285a795 (patch) | |
tree | 72b0529c61b5b3b14a5f4c8f309aa36adb5c8c70 /scripts/qapi | |
parent | 6598f0cdad6acc6674c4f060fa46e537228c2c47 (diff) | |
download | qemu-25b1ef31db30a7dace4d3a485f0a3b3c7285a795.zip qemu-25b1ef31db30a7dace4d3a485f0a3b3c7285a795.tar.gz qemu-25b1ef31db30a7dace4d3a485f0a3b3c7285a795.tar.bz2 |
qapi: Make 'allow-oob' optional in SchemaInfoCommand
Making 'allow-oob' optional in SchemaInfoCommand permits omitting it
in the common case. Shrinks query-qmp-schema's output from 122.1KiB
to 118.6KiB for me.
Note that out-of-band execution is still experimental (you have to
configure the monitor with x-oob=on to use it).
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180718090557.17248-1-armbru@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'scripts/qapi')
-rw-r--r-- | scripts/qapi/introspect.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index 70ca5dd..189a4ed 100644 --- a/scripts/qapi/introspect.py +++ b/scripts/qapi/introspect.py @@ -184,11 +184,11 @@ const QLitObject %(c_name)s = %(c_string)s; success_response, boxed, allow_oob, allow_preconfig): arg_type = arg_type or self._schema.the_empty_object_type ret_type = ret_type or self._schema.the_empty_object_type - self._gen_qlit(name, 'command', - {'arg-type': self._use_type(arg_type), - 'ret-type': self._use_type(ret_type), - 'allow-oob': allow_oob}, - ifcond) + obj = {'arg-type': self._use_type(arg_type), + 'ret-type': self._use_type(ret_type) } + if allow_oob: + obj['allow-oob'] = allow_oob + self._gen_qlit(name, 'command', obj, ifcond) def visit_event(self, name, info, ifcond, arg_type, boxed): arg_type = arg_type or self._schema.the_empty_object_type |