提交 5c5432e7 编写于 作者: A Anthony Liguori

Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Luiz Capitulino (1) and Richard Henderson (1)
# Via Luiz Capitulino
* luiz/queue/qmp:
  MAINTAINERS: add git tree info for HMP, QMP and QAPI
  Adjust qapi-visit for python-2.4.3

Message-id: 1384281985-11100-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
...@@ -699,6 +699,7 @@ S: Supported ...@@ -699,6 +699,7 @@ S: Supported
F: monitor.c F: monitor.c
F: hmp.c F: hmp.c
F: hmp-commands.hx F: hmp-commands.hx
T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
Network device layer Network device layer
M: Anthony Liguori <aliguori@amazon.com> M: Anthony Liguori <aliguori@amazon.com>
...@@ -720,6 +721,7 @@ M: Luiz Capitulino <lcapitulino@redhat.com> ...@@ -720,6 +721,7 @@ M: Luiz Capitulino <lcapitulino@redhat.com>
M: Michael Roth <mdroth@linux.vnet.ibm.com> M: Michael Roth <mdroth@linux.vnet.ibm.com>
S: Supported S: Supported
F: qapi/ F: qapi/
T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
QAPI Schema QAPI Schema
M: Eric Blake <eblake@redhat.com> M: Eric Blake <eblake@redhat.com>
...@@ -727,6 +729,7 @@ M: Luiz Capitulino <lcapitulino@redhat.com> ...@@ -727,6 +729,7 @@ M: Luiz Capitulino <lcapitulino@redhat.com>
M: Markus Armbruster <armbru@redhat.com> M: Markus Armbruster <armbru@redhat.com>
S: Supported S: Supported
F: qapi-schema.json F: qapi-schema.json
T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
QMP QMP
M: Luiz Capitulino <lcapitulino@redhat.com> M: Luiz Capitulino <lcapitulino@redhat.com>
...@@ -735,6 +738,7 @@ F: qmp.c ...@@ -735,6 +738,7 @@ F: qmp.c
F: monitor.c F: monitor.c
F: qmp-commands.hx F: qmp-commands.hx
F: QMP/ F: QMP/
T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
SLIRP SLIRP
M: Jan Kiszka <jan.kiszka@siemens.com> M: Jan Kiszka <jan.kiszka@siemens.com>
......
...@@ -20,7 +20,10 @@ import errno ...@@ -20,7 +20,10 @@ import errno
def generate_visit_struct_fields(name, field_prefix, fn_prefix, members, base = None): def generate_visit_struct_fields(name, field_prefix, fn_prefix, members, base = None):
substructs = [] substructs = []
ret = '' ret = ''
full_name = name if not fn_prefix else "%s_%s" % (name, fn_prefix) if not fn_prefix:
full_name = name
else:
full_name = "%s_%s" % (name, fn_prefix)
for argname, argentry, optional, structured in parse_args(members): for argname, argentry, optional, structured in parse_args(members):
if structured: if structured:
...@@ -97,7 +100,10 @@ if (!error_is_set(errp)) { ...@@ -97,7 +100,10 @@ if (!error_is_set(errp)) {
''') ''')
push_indent() push_indent()
full_name = name if not field_prefix else "%s_%s" % (field_prefix, name) if not field_prefix:
full_name = name
else:
full_name = "%s_%s" % (field_prefix, name)
if len(field_prefix): if len(field_prefix):
ret += mcgen(''' ret += mcgen('''
...@@ -283,12 +289,17 @@ void visit_type_%(name)s(Visitor *m, %(name)s ** obj, const char *name, Error ** ...@@ -283,12 +289,17 @@ void visit_type_%(name)s(Visitor *m, %(name)s ** obj, const char *name, Error **
name=name) name=name)
pop_indent() pop_indent()
if not discriminator:
desc_type = "type"
else:
desc_type = discriminator
ret += mcgen(''' ret += mcgen('''
visit_type_%(name)sKind(m, &(*obj)->kind, "%(type)s", &err); visit_type_%(name)sKind(m, &(*obj)->kind, "%(type)s", &err);
if (!err) { if (!err) {
switch ((*obj)->kind) { switch ((*obj)->kind) {
''', ''',
name=name, type="type" if not discriminator else discriminator) name=name, type=desc_type)
for key in members: for key in members:
if not discriminator: if not discriminator:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册