summaryrefslogtreecommitdiff
path: root/script/generate_param.py
AgeCommit message (Collapse)AuthorFilesLines
2023-05-05param: Fix resource leakJoseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-05-11param: Enable including source3/param/param_proto.h without vfs.hVolker Lendecke1-0/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-27docs-xml: remove explicit "constant"Ralph Boehme1-34/+33
The constant mark applied to types "string" and "ustring". The previous patches in this patchset already markes all string options as either constant or substituted, but it's still possible to add options or change existing ones to be neither constant nor substituted. In order to enforce strings to be either constant or substitued, remove the explicit constant marker. Instead, any option that is not marked as substituted is implicitly made constant. This patch doesn't change behaviour and all generated files are the same before and after this change. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27param: add FN_{GLOBAL,LOCAL}_SUBSTITUTED_STRING supportStefan Metzmacher1-2/+20
Pair-Programmed-With: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org>
2019-01-17generate_param.py: Use C99 initializer for last element in param tableAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-10-25script/generate_param.py: remove unused importsDouglas Bagnall1-4/+0
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-08-24PEP8: fix W291: trailing whitespaceJoe Guo1-4/+4
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E703: statement ends with a semicolonJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E305: expected 2 blank lines after class or function definition, ↵Joe Guo1-0/+4
found 1 Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E303: too many blank lines (2)Joe Guo1-1/+0
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+6
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E251: unexpected spaces around keyword / parameter equalsJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E225: missing whitespace around operatorJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E203: whitespace before ':'Joe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E202: whitespace before ')'Joe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E128: continuation line under-indented for visual indentJoe Guo1-1/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E111: indentation is not a multiple of fourJoe Guo1-7/+7
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-02-15scripts/ python: convert 'except X, e' to 'except X as e'Douglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-07-31generate_param: add a means to generate param_table_gen.c from the docsMichael Adam1-3/+104
This is triggered by the new argument PARAMTABLE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31generate_param: teach missing types cmdlist, bytes, octal, ustring.Michael Adam1-0/+8
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31generate_param: more uniform formatting of various type dictsMichael Adam1-5/+18
This allows for easier extension later on (patch context-wise). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31param: move dnsdomain from generate_param to EXTRA_GLOBALSMichael Adam1-1/+0
This is alongside realm_original which is of the same kind. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31generate_param: generate struct entries if we don't generate access functions.Michael Adam1-2/+0
This shrinks LOADPARM_EXTRA_GLOBALS/LOCALS. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-31generate_param: make it possible to handle generated and synonym flags in ↵Michael Adam1-2/+22
iteration Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-20param: change s3_param.h from a generated file to a static oneGarming Sam1-31/+2
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: I131e37ec92f7a826caec382023915c5e4b4c52be Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20param: remove generated loadparm ctx table file and include it directlyGarming Sam1-27/+2
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>
2014-02-20param: use loadparm_globals struct instead of lp function pointers in s3_helpersGarming Sam1-34/+3
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: I4507cdbf111b7f9dca3ca18ee2bf242ffdfeb4e7 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20lib/param: handle non-constant strings properly by passing in a memory contextGarming Sam1-13/+18
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: Ic6bb1c709defd2b0f35fc7b877da0badca385776 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-12lib/param: update generate_param.py to generate more of loadparmGarming Sam1-24/+259
These files can now be generated directly from the xml rather than from param_functions.c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12param: auto generate param_functions.c at build timeGarming Sam1-0/+113
generate_param.py reads the documentation to define which functions need to be generated. To add new parameters, edit the xml files in docs-xml/smbdotconf. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>