summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell2014-05-22 20:04:48 +0200
committerPeter Maydell2014-05-22 20:04:49 +0200
commit178ac111bca16c08a79b2609ebdc75197bea976a (patch)
treed71997ac5687bf97ca2477f8f54e2edced71d2a6 /scripts
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-chardev-2' into staging (diff)
parentqapi: zero-initialize all QMP command parameters (diff)
downloadqemu-178ac111bca16c08a79b2609ebdc75197bea976a.tar.gz
qemu-178ac111bca16c08a79b2609ebdc75197bea976a.tar.xz
qemu-178ac111bca16c08a79b2609ebdc75197bea976a.zip
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: qapi: zero-initialize all QMP command parameters scripts/qapi.py: Avoid syntax not supported by Python 2.4 doc: add "setup" to list of migration states Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi-commands.py2
-rw-r--r--scripts/qapi.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 386f17ef44..7d93d01ed2 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -111,7 +111,7 @@ bool has_%(argname)s = false;
argname=c_var(argname), argtype=c_type(argtype))
else:
ret += mcgen('''
-%(argtype)s %(argname)s;
+%(argtype)s %(argname)s = {0};
''',
argname=c_var(argname), argtype=c_type(argtype))
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 0265b404dd..86e96089af 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -116,7 +116,7 @@ class QAPISchema:
continue
try:
fobj = open(include_path, 'r')
- except IOError as e:
+ except IOError, e:
raise QAPIExprError(expr_info,
'%s: %s' % (e.strerror, include))
exprs_include = QAPISchema(fobj, include, self.include_hist,