1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

param: remove generated loadparm ctx table file and include it directly

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I5f1d42e3ae6495accf7a711938cc28c03ab2cd62
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
This commit is contained in:
Garming Sam
2014-01-24 15:52:15 +13:00
committed by Andrew Bartlett
parent 9780113846
commit 0941789063
3 changed files with 16 additions and 34 deletions

View File

@ -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)