From b85346942e7d785af718b68d61b208cb457a2b27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 14 Mar 1998 08:27:41 +0000 Subject: another makeover of loadparm to support new stuff in swat and testparm. In particular I added: - ability to optionally save default values of all parameters when calling lp_load(). This can then be used to save only non-default parameters in lp_dump(). This makes the saved smb.conf (and viewed parameters in testparm) much shorter - ability to not load ipc share in lp_load() - separators in parm_table[] so parameters can be grouped logically. - flag to mark parameters that are local but which should be also viewed as global as far as parameters editing is concerned (This used to be commit f9af35da26e58fb0b644b5f0169f1c212230047a) --- source3/include/smb.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index a60b74a835..48d9a8919d 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -613,12 +613,12 @@ struct connection_options { typedef enum { P_BOOL,P_BOOLREV,P_CHAR,P_INTEGER,P_OCTAL, - P_STRING,P_USTRING,P_GSTRING,P_UGSTRING,P_ENUM + P_STRING,P_USTRING,P_GSTRING,P_UGSTRING,P_ENUM,P_SEP } parm_type; typedef enum { - P_LOCAL,P_GLOBAL,P_NONE + P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE, } parm_class; struct enum_list { @@ -635,12 +635,19 @@ struct parm_struct BOOL (*special)(); struct enum_list *enum_list; unsigned flags; + union { + BOOL bvalue; + int ivalue; + char *svalue; + char cvalue; + } def; }; -#define FLAG_BASIC 1 -#define FLAG_HIDE 2 -#define FLAG_PRINT 4 +#define FLAG_BASIC 1 /* fundamental options */ +#define FLAG_HIDE 2 /* options that should be hidden in SWAT */ +#define FLAG_PRINT 4 /* printing options */ +#define FLAG_GLOBAL 8 /* local options that should be globally settable in SWAT */ #ifndef LOCKING_VERSION #define LOCKING_VERSION 4 -- cgit