diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-02 12:34:46 -0500 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-04 11:00:46 -0300 |
commit | 776574d6417cf623fb071987cdd2c6bc13271dc2 (patch) | |
tree | d1ceb48587b1e32f0e5448628b24bd9d80bdbb7b /scripts/qapi.py | |
parent | 2a82d936a2bda9cb01d05fc91845e82001b78632 (diff) | |
download | qemu-776574d6417cf623fb071987cdd2c6bc13271dc2.zip |
qapi: add code generation support for middle mode
To get the ball rolling merging QAPI, this patch introduces a "middle mode" to
the code generator. In middle mode, the code generator generates marshalling
functions that are compatible with the current QMP server. We absolutely need
to replace the current QMP server in order to support proper asynchronous
commands but using a middle mode provides a middle-ground that lets us start
converting commands in tree.
Note that all of the commands have been converted already in my glib branch.
Middle mode only exists until we finish merging them from my branch into the
main tree.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r-- | scripts/qapi.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 56af2329bb..52999763ee 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -200,4 +200,6 @@ def basename(filename): return filename.split("/")[-1] def guardname(filename): - return filename.replace("/", "_").replace("-", "_").split(".")[0].upper() + if filename.startswith('./'): + filename = filename[2:] + return filename.replace("/", "_").replace("-", "_").split(".")[0].upper() + '_H' |