diff options
Diffstat (limited to 'source3/utils/testparm.c')
-rw-r--r-- | source3/utils/testparm.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index e3d6ce0274..ec58f906ed 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -177,21 +177,18 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ printf("'algorithmic rid base' must be even.\n"); } -#ifndef HAVE_DLOPEN - if (lp_preload_modules()) { - printf("WARNING: 'preload modules = ' set while loading plugins not supported.\n"); - } -#endif - return ret; } - int main(int argc, const char *argv[]) +int main(int argc, const char *argv[]) { + extern char *optarg; + extern int optind; const char *config_file = dyn_CONFIGFILE; int s; static BOOL silent_mode = False; int ret = 0; + int opt; poptContext pc; static const char *term_code = ""; static char *new_local_machine = NULL; @@ -205,15 +202,15 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ {"verbose", 'v', POPT_ARG_NONE, &show_defaults, 1, "Show default options too"}, {"server", 'L',POPT_ARG_STRING, &new_local_machine, 0, "Set %%L macro to servername\n"}, {"encoding", 't', POPT_ARG_STRING, &term_code, 0, "Print parameters with encoding"}, - POPT_COMMON_VERSION - POPT_TABLEEND + {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version}, + {0,0,0,0} }; pc = poptGetContext(NULL, argc, argv, long_options, POPT_CONTEXT_KEEP_FIRST); poptSetOtherOptionHelp(pc, "[OPTION...] <config-file> [host-name] [host-ip]"); - while(poptGetNextOpt(pc) != -1); + while((opt = poptGetNextOpt(pc)) != -1); setup_logging(poptGetArg(pc), True); |