[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 11/17] qapi: remove the "middle" mode
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v4 11/17] qapi: remove the "middle" mode |
Date: |
Wed, 10 Aug 2016 22:02:29 +0400 |
From: Marc-André Lureau <address@hidden>
Now that the register function is always generated, we can
remove the so-called "middle" mode from the generator script.
Signed-off-by: Marc-André Lureau <address@hidden>
---
scripts/qapi-commands.py | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index b150db9..eac64ce 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -206,8 +206,7 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor):
self._visited_ret_types = set()
def visit_end(self):
- if not middle_mode:
- self.defn += gen_registry(self._regy)
+ self.defn += gen_registry(self._regy)
self._regy = None
self._visited_ret_types = None
@@ -221,18 +220,10 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor):
self.defn += gen_marshal_output(ret_type)
self.decl += gen_marshal_decl(name)
self.defn += gen_marshal(name, arg_type, boxed, ret_type)
- if not middle_mode:
- self._regy += gen_register_command(name, success_response)
+ self._regy += gen_register_command(name, success_response)
-middle_mode = False
-
-(input_file, output_dir, do_c, do_h, prefix, opts) = \
- parse_command_line("m", ["middle"])
-
-for o, a in opts:
- if o in ("-m", "--middle"):
- middle_mode = True
+(input_file, output_dir, do_c, do_h, prefix, opts) = parse_command_line()
c_comment = '''
/*
--
2.9.0
- Re: [Qemu-devel] [PATCH v4 05/17] monitor: register gen:false commands manually, (continued)
- [Qemu-devel] [PATCH v4 07/17] qapi: export the marshallers, marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 08/17] monitor: use qmp_find_command() (using generated qapi code), marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 09/17] monitor: implement 'qmp_query_commands' without qmp_cmds, marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 11/17] qapi: remove the "middle" mode,
marcandre . lureau <=
- [Qemu-devel] [PATCH v4 10/17] monitor: remove mhandler.cmd_new, marcandre . lureau, 2016/08/10
- [Qemu-devel] [PATCH v4 12/17] qapi: check invalid arguments on no-args commands, marcandre . lureau, 2016/08/10
[Qemu-devel] [PATCH v4 13/17] qmp: update qmp_query_spice fallback, marcandre . lureau, 2016/08/10
[Qemu-devel] [PATCH v4 14/17] monitor: use qmp_dispatch(), marcandre . lureau, 2016/08/10
[Qemu-devel] [PATCH v4 15/17] build-sys: remove qmp-commands-old.h, marcandre . lureau, 2016/08/10
[Qemu-devel] [PATCH v4 17/17] qmp-commands.txt: fix some styling, marcandre . lureau, 2016/08/10