From 1a6aecaea81a06602e2d216a766ab9f7c21f6a77 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 30 Jul 2008 16:24:20 +0200 Subject: testparm: Display warning if invalid values are used. This one came up while using "csc policy = disabled" instead of "disable"... ;-) (This used to be commit d01da44de77abbf724389bce924771f2975867f4) --- source3/param/loadparm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0935181e09..6902bb0437 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -7047,9 +7047,11 @@ static void lp_set_enum_parm( struct parm_struct *parm, const char *pszParmValue for (i = 0; parm->enum_list[i].name; i++) { if ( strequal(pszParmValue, parm->enum_list[i].name)) { *ptr = parm->enum_list[i].value; - break; + return; } } + DEBUG(0, ("WARNING: Ignoring invalid value '%s' for parameter '%s'\n", + pszParmValue, parm->label)); } /*************************************************************************** -- cgit