diff options
Diffstat (limited to 'scripts/qapi-event.py')
-rw-r--r-- | scripts/qapi-event.py | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py index 3e1f4cf0fd..bc5ca4ad11 100644 --- a/scripts/qapi-event.py +++ b/scripts/qapi-event.py @@ -11,9 +11,7 @@ from ordereddict import OrderedDict from qapi import * -import sys import os -import getopt import errno def _generate_event_api_name(event_name, params): @@ -219,38 +217,10 @@ const char *%(event_enum_name)s_lookup[] = { # Start the real job -try: - opts, args = getopt.gnu_getopt(sys.argv[1:], "chp:i:o:", - ["source", "header", "prefix=", - "input-file=", "output-dir="]) -except getopt.GetoptError, err: - print str(err) - sys.exit(1) - -input_file = "" -output_dir = "" -prefix = "" c_file = 'qapi-event.c' h_file = 'qapi-event.h' -do_c = False -do_h = False - -for o, a in opts: - if o in ("-p", "--prefix"): - prefix = a - elif o in ("-i", "--input-file"): - input_file = a - elif o in ("-o", "--output-dir"): - output_dir = a + "/" - elif o in ("-c", "--source"): - do_c = True - elif o in ("-h", "--header"): - do_h = True - -if not do_c and not do_h: - do_c = True - do_h = True +(input_file, output_dir, do_c, do_h, prefix, dummy) = parse_command_line() c_file = output_dir + prefix + c_file h_file = output_dir + prefix + h_file |