qapi: allow a 'gen' key to suppress code generation
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
		
							parent
							
								
									83e94fb8d5
								
							
						
					
					
						commit
						5dbee474f3
					
				@ -405,6 +405,7 @@ except os.error, e:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
exprs = parse_schema(sys.stdin)
 | 
					exprs = parse_schema(sys.stdin)
 | 
				
			||||||
commands = filter(lambda expr: expr.has_key('command'), exprs)
 | 
					commands = filter(lambda expr: expr.has_key('command'), exprs)
 | 
				
			||||||
 | 
					commands = filter(lambda expr: not expr.has_key('gen'), commands)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if dispatch_type == "sync":
 | 
					if dispatch_type == "sync":
 | 
				
			||||||
    fdecl = open(h_file, 'w')
 | 
					    fdecl = open(h_file, 'w')
 | 
				
			||||||
 | 
				
			|||||||
@ -238,6 +238,7 @@ fdecl.write(mcgen('''
 | 
				
			|||||||
                  guard=guardname(h_file)))
 | 
					                  guard=guardname(h_file)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exprs = parse_schema(sys.stdin)
 | 
					exprs = parse_schema(sys.stdin)
 | 
				
			||||||
 | 
					exprs = filter(lambda expr: not expr.has_key('gen'), exprs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for expr in exprs:
 | 
					for expr in exprs:
 | 
				
			||||||
    ret = "\n"
 | 
					    ret = "\n"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user