param: Remove unused P_SEP and P_SEPARATOR
authorMichael Adam <obnox@samba.org>
Tue, 21 Apr 2015 15:25:24 +0000 (17:25 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 1 May 2015 22:56:31 +0000 (00:56 +0200)
This was only used in swat.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
lib/param/loadparm.c
lib/param/loadparm.h
lib/param/param_table.c
python/samba/tests/docs.py
source3/param/loadparm.c
source4/param/pyparam.c

index 34974d7c298f907c564d8b46193f26073b15967a..bb215b26992a17f8ed5197fa935e6f29c904d72a 100644 (file)
@@ -1549,8 +1549,6 @@ static bool set_variable_helper(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr
                        }
                        break;
 
-               case P_SEP:
-                       break;
        }
 
        return true;
@@ -1876,8 +1874,6 @@ void lpcfg_print_parameter(struct parm_struct *p, void *ptr, FILE * f)
                                fprintf(f, "%s", *(char **)ptr);
                        }
                        break;
-               case P_SEP:
-                       break;
        }
 }
 
@@ -1915,8 +1911,6 @@ static bool lpcfg_equal_parameter(parm_type type, void *ptr1, void *ptr2)
                                p2 = NULL;
                        return (p1 == p2 || strequal(p1, p2));
                }
-               case P_SEP:
-                       break;
        }
        return false;
 }
@@ -2004,8 +1998,6 @@ static bool is_default(void *base_structure, int i)
                case P_ENUM:
                        return parm_table[i].def.ivalue ==
                                *(int *)def_ptr;
-               case P_SEP:
-                       break;
        }
        return false;
 }
index 4d5c54e0d42cd03efbfa54a528fc3c5374422646..b789db13df4aac5e22994eb58c48141a7cc709a7 100644 (file)
 /* the following are used by loadparm for option lists */
 typedef enum {
        P_BOOL,P_BOOLREV,P_CHAR,P_INTEGER,P_OCTAL,P_LIST,
-       P_STRING,P_USTRING,P_ENUM,P_BYTES,P_CMDLIST,P_SEP
+       P_STRING,P_USTRING,P_ENUM,P_BYTES,P_CMDLIST
 } parm_type;
 
 typedef enum {
-       P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE
+       P_LOCAL,P_GLOBAL,P_NONE
 } parm_class;
 
 struct enum_list {
index 8b44733dbed413c1eaaf729b4c56430fe602c2c3..2278bde47bb431974000f1dfea02bd42d43eb368 100644 (file)
@@ -293,8 +293,6 @@ static const struct enum_list enum_case[] = {
 
 
 struct parm_struct parm_table[] = {
-       {N_("Base Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "dos charset",
                .type           = P_STRING,
@@ -430,9 +428,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = enum_server_role,
                .flags          = FLAG_BASIC | FLAG_ADVANCED,
        },
-
-       {N_("Security Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "security",
                .type           = P_ENUM,
@@ -1156,10 +1151,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
        },
-
-
-       {N_("Logging Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "log level",
                .type           = P_STRING,
@@ -1295,9 +1286,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("Protocol Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "allocation roundup size",
                .type           = P_BYTES,
@@ -1769,9 +1757,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("Tuning Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "block size",
                .type           = P_BYTES,
@@ -2060,9 +2045,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("Printing Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "max reported print jobs",
                .type           = P_INTEGER,
@@ -2389,9 +2371,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_PRINT,
        },
-
-       {N_("Filename Handling"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "mangling method",
                .type           = P_STRING,
@@ -2618,10 +2597,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
        },
-
-
-       {N_("Domain Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "machine password timeout",
                .type           = P_INTEGER,
@@ -2631,9 +2606,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_WIZARD,
        },
-
-       {N_("Logon Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "add user script",
                .type           = P_STRING,
@@ -2817,9 +2789,6 @@ struct parm_struct parm_table[] = {
                .flags          = FLAG_ADVANCED,
 
        },
-
-       {N_("Browse Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "os level",
                .type           = P_INTEGER,
@@ -2928,9 +2897,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("WINS Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "dns proxy",
                .type           = P_BOOL,
@@ -2976,9 +2942,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("Locking Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "blocking locks",
                .type           = P_BOOL,
@@ -3105,9 +3068,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = enum_bool_auto,
                .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
        },
-
-       {N_("Ldap Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "ldap admin dn",
                .type           = P_STRING,
@@ -3279,9 +3239,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("EventLog Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "eventlog list",
                .type           = P_CMDLIST,
@@ -3291,9 +3248,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
        },
-
-       {N_("Miscellaneous Options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "add share command",
                .type           = P_STRING,
@@ -3900,9 +3854,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("VFS module options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "vfs objects",
                .type           = P_CMDLIST,
@@ -3921,10 +3872,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_HIDE,
        },
-
-
-       {N_("MSDFS options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "msdfs root",
                .type           = P_BOOL,
@@ -3961,9 +3908,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("Winbind options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "passdb expand explicit",
                .type           = P_BOOL,
@@ -4279,8 +4223,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("DNS options"), P_SEP, P_SEPARATOR},
        {
                .label          = "allow dns updates",
                .type           = P_ENUM,
@@ -4335,9 +4277,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
        },
-
-       {N_("AD DC options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "samba kcc command",
                .type           = P_CMDLIST,
@@ -4406,9 +4345,6 @@ struct parm_struct parm_table[] = {
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,
        },
-
-       {N_("TLS options"), P_SEP, P_SEPARATOR},
-
        {
                .label          = "tls enabled",
                .type           = P_BOOL,
index 3e7dcbc8e2fe0a68b6caff16377606923c9cf433..1b9b94a5b861eab2462e3dac17e6187279ba6b37 100644 (file)
@@ -72,8 +72,6 @@ def get_implementation_parameters(sourcedir):
             if re.match("^\s*\}\;\s*$", l):
                 break
             # pull in the param names only
-            if re.match(".*P_SEPARATOR.*", l):
-                continue
             m = re.match("\s*\.label\s*=\s*\"(.*)\".*", l)
             if not m:
                 continue
index 98946abe6947b97929daf28cc853bf30328b5fba..f36262a7a8b6f4fa68c1b9d22e5595f2abc3ad8a 100644 (file)
@@ -1713,7 +1713,7 @@ static void show_parameter(int parmIndex)
        bool inverse;
        const char *type[] = { "P_BOOL", "P_BOOLREV", "P_CHAR", "P_INTEGER",
                "P_OCTAL", "P_LIST", "P_STRING", "P_USTRING",
-               "P_ENUM", "P_SEP"};
+               "P_ENUM" };
        unsigned flags[] = { FLAG_BASIC, FLAG_SHARE, FLAG_PRINT, FLAG_GLOBAL,
                FLAG_WIZARD, FLAG_ADVANCED, FLAG_DEVELOPER, FLAG_DEPRECATED,
                FLAG_HIDE};
@@ -2824,8 +2824,6 @@ static void lp_save_defaults(void)
                                parm_table[i].def.ivalue =
                                        *(int *)lp_parm_ptr(NULL, &parm_table[i]);
                                break;
-                       case P_SEP:
-                               break;
                }
        }
 
index e780c2ece8c558749e3aaac86bb8f6539562fa5d..14ffb2d8c38263ed9eecf2da275e4cb9902dafd6 100644 (file)
@@ -143,8 +143,6 @@ static PyObject *py_lp_ctx_get_helper(struct loadparm_context *lp_ctx, const cha
                               PyString_FromString(strlist[j]));
            return pylist;
        }
-    case P_SEP:
-       return NULL; /* this stands for a separator, can be ignored */
     }
     return NULL;