From 10374dde0f9d2e13496198b90c0c6e592bfef86c Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 24 Jul 2015 01:56:39 +0200 Subject: [PATCH] param: update the README with instructions for adding a parameter Signed-off-by: Michael Adam Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Jul 31 05:00:57 CEST 2015 on sn-devel-104 --- lib/param/README | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/param/README b/lib/param/README index 6a53a455c24..d83fe9a7a3a 100644 --- a/lib/param/README +++ b/lib/param/README @@ -10,13 +10,23 @@ such as the configured shares, default parameter values and host secret keys. Adding a parameter ------------------ -To add or change an smb.conf option, you only have to modify -lib/param/param_table.c and add the documentation to docs-xml/smbdotconf. -If special defaults are needed, the functions loadparm_int() in -lib/param/loadparm.c and/or init_globals() in source3/param/loadparm.c -need to be adapted accordingly. +To add or change an smb.conf option, in general you only have to add +the documentation to docs-xml/smbdotconf, or change it. +In addition to that, if special defaults are needed, the functions +loadparm_init() in lib/param/loadparm.c and/or init_globals() in +source3/param/loadparm.c need to be adapted accordingly. The rest is generated for you. +It is important to get the attributes right in the +tag of the xml files. These determine the details of the generated code. + +- Supported attributes are name, context, type, constant, function, + generated_function, synonym, parm, enumlist, handler, and deprecated. +- Supported contexts are 'G' (for global) and 'S' (for share). +- Supported types are boolean, boolean-rev, boolean-auto, list, + cmdlist, string, ustring, char, integer, bytes, octal, and enum. + + Using smb.conf parameters in the code ------------------------------------- -- 2.34.1