mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Eliminate QCO_NO_OPTIONS for a slight simplification
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-Id: <20211028102520.747396-4-armbru@redhat.com>
This commit is contained in:
parent
9fb49daabf
commit
9bafe07bc8
3 changed files with 2 additions and 7 deletions
|
@ -229,15 +229,12 @@ def gen_register_command(name: str,
|
|||
if coroutine:
|
||||
options += ['QCO_COROUTINE']
|
||||
|
||||
if not options:
|
||||
options = ['QCO_NO_OPTIONS']
|
||||
|
||||
ret = mcgen('''
|
||||
qmp_register_command(cmds, "%(name)s",
|
||||
qmp_marshal_%(c_name)s, %(opts)s);
|
||||
''',
|
||||
name=name, c_name=c_name(name),
|
||||
opts=" | ".join(options))
|
||||
opts=' | '.join(options) or 0)
|
||||
return ret
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue