Skip to content

Commit

Permalink
param: Remove unused P_SEP and P_SEPARATOR
Browse files Browse the repository at this point in the history
This was only used in swat.

Signed-off-by: Michael Adam <[email protected]>
Reviewed-by: Ira Cooper <[email protected]>
  • Loading branch information
obnoxxx committed May 1, 2015
1 parent 5384035 commit 8489543
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 81 deletions.
8 changes: 0 additions & 8 deletions lib/param/loadparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/param/loadparm.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
/* 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 {
Expand Down
64 changes: 0 additions & 64 deletions lib/param/param_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions python/samba/tests/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions source3/param/loadparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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;
}
}

Expand Down
2 changes: 0 additions & 2 deletions source4/param/pyparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8489543

Please sign in to comment.