Ver código fonte

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

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori 13 anos atrás
pai
commit
5dbee474f3
2 arquivos alterados com 2 adições e 0 exclusões
  1. 1 0
      scripts/qapi-commands.py
  2. 1 0
      scripts/qapi-types.py

+ 1 - 0
scripts/qapi-commands.py

@@ -405,6 +405,7 @@ def gen_command_def_prologue(prefix="", proxy=False):
 
 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')

+ 1 - 0
scripts/qapi-types.py

@@ -238,6 +238,7 @@ def generate_type_cleanup(name):
                   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"