diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/generate_param.py | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/script/generate_param.py b/script/generate_param.py index 97ef470c325..8bd2e2b48ba 100644 --- a/script/generate_param.py +++ b/script/generate_param.py @@ -35,8 +35,8 @@ parser.add_option("-f", "--file", dest="filename", help="input file", metavar="FILE") parser.add_option("-o", "--output", dest="output", help='output file', metavar="FILE") -parser.add_option("--mode", type="choice", metavar="<FUNCTIONS|S3PROTO|LIBPROTO|PARAMDEFS|S3PARAM|S3TABLE>", - choices=["FUNCTIONS", "S3PROTO", "LIBPROTO", "PARAMDEFS", "S3PARAM", "S3TABLE"], default="FUNCTIONS") +parser.add_option("--mode", type="choice", metavar="<FUNCTIONS|S3PROTO|LIBPROTO|PARAMDEFS|S3PARAM>", + choices=["FUNCTIONS", "S3PROTO", "LIBPROTO", "PARAMDEFS", "S3PARAM"], default="FUNCTIONS") parser.add_option("--scope", metavar="<GLOBAL|LOCAL>", choices = ["GLOBAL", "LOCAL"], default="GLOBAL") @@ -285,29 +285,6 @@ def make_s3_param(path_in, path_out): finally: file_out.close() -def make_s3_param_ctx_table(path_in, path_out): - file_out = open(path_out, 'w') - try: - file_out.write('/* This file was automatically generated by generate_param.py. DO NOT EDIT */\n\n') - file_out.write("static struct loadparm_s3_helpers s3_fns =\n") - file_out.write("{\n") - file_out.write("\t.get_parametric = lp_parm_const_string_service,\n") - file_out.write("\t.get_parm_struct = lp_get_parameter,\n") - file_out.write("\t.get_parm_ptr = lp_parm_ptr,\n") - file_out.write("\t.get_service = lp_service_for_s4_ctx,\n") - file_out.write("\t.get_servicebynum = lp_servicebynum_for_s4_ctx,\n") - file_out.write("\t.get_default_loadparm_service = lp_default_loadparm_service,\n") - file_out.write("\t.get_numservices = lp_numservices,\n") - file_out.write("\t.load = lp_load_for_s4_ctx,\n") - file_out.write("\t.set_cmdline = lp_set_cmdline,\n") - file_out.write("\t.dump = lp_dump,\n") - file_out.write("\t.dnsdomain = lp_dnsdomain,\n") - file_out.write("};") - finally: - file_out.close() - - - if options.mode == 'FUNCTIONS': generate_functions(options.filename, options.output) elif options.mode == 'S3PROTO': @@ -318,5 +295,3 @@ elif options.mode == 'PARAMDEFS': make_param_defs(options.filename, options.output, options.scope) elif options.mode == 'S3PARAM': make_s3_param(options.filename, options.output) -elif options.mode == 'S3TABLE': - make_s3_param_ctx_table(options.filename, options.output) |