sim-card
/
qemu
Archived
10
0
Fork 0

qapi: allow a 'gen' key to suppress code generation

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2011-12-12 14:29:33 -06:00
parent 83e94fb8d5
commit 5dbee474f3
2 changed files with 2 additions and 0 deletions

View File

@ -405,6 +405,7 @@ except os.error, e:
exprs = parse_schema(sys.stdin)
commands = filter(lambda expr: expr.has_key('command'), exprs)
commands = filter(lambda expr: not expr.has_key('gen'), commands)
if dispatch_type == "sync":
fdecl = open(h_file, 'w')

View File

@ -238,6 +238,7 @@ fdecl.write(mcgen('''
guard=guardname(h_file)))
exprs = parse_schema(sys.stdin)
exprs = filter(lambda expr: not expr.has_key('gen'), exprs)
for expr in exprs:
ret = "\n"