From 7b75d9d61bf9b7b43f6df2fb2fbfc38c4eb9d2e9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 31 Oct 2013 13:26:01 -0700 Subject: [PATCH 1/2] Adjust qapi-visit for python-2.4.3 We say we support python 2.4, but python 2.4.3 does not support the "expr if test else expr" syntax used here. This allows QEMU to compile on RHEL 5.3, the last release for ia64. Signed-off-by: Richard Henderson Reviewed-by: Michael Roth Signed-off-by: Luiz Capitulino --- scripts/qapi-visit.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index c39e6284b8..65f1a54ee7 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -20,7 +20,10 @@ import errno def generate_visit_struct_fields(name, field_prefix, fn_prefix, members, base = None): substructs = [] 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): if structured: @@ -97,7 +100,10 @@ if (!error_is_set(errp)) { ''') 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): ret += mcgen(''' @@ -283,12 +289,17 @@ void visit_type_%(name)s(Visitor *m, %(name)s ** obj, const char *name, Error ** name=name) pop_indent() + + if not discriminator: + desc_type = "type" + else: + desc_type = discriminator ret += mcgen(''' visit_type_%(name)sKind(m, &(*obj)->kind, "%(type)s", &err); if (!err) { switch ((*obj)->kind) { ''', - name=name, type="type" if not discriminator else discriminator) + name=name, type=desc_type) for key in members: if not discriminator: From dce07e0b2b172ccce43955fdee2149ab2413251b Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Tue, 5 Nov 2013 16:09:37 -0500 Subject: [PATCH 2/2] MAINTAINERS: add git tree info for HMP, QMP and QAPI Signed-off-by: Luiz Capitulino --- MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 77edacf271..02b85ee4cd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -699,6 +699,7 @@ S: Supported F: monitor.c F: hmp.c F: hmp-commands.hx +T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp Network device layer M: Anthony Liguori @@ -720,6 +721,7 @@ M: Luiz Capitulino M: Michael Roth S: Supported F: qapi/ +T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp QAPI Schema M: Eric Blake @@ -727,6 +729,7 @@ M: Luiz Capitulino M: Markus Armbruster S: Supported F: qapi-schema.json +T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp QMP M: Luiz Capitulino @@ -735,6 +738,7 @@ F: qmp.c F: monitor.c F: qmp-commands.hx F: QMP/ +T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp SLIRP M: Jan Kiszka