summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-11-02 16:16:15 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-11-02 16:16:15 +0000
commit8a6b05d36d460a1814e72f634835604f48f570d9 (patch)
tree34b52bbbf4766911503be87a42e6b63062d24f59 /source3/nmbd
parenta80438d96ce2bc94965b9f26e4976dd5809ae154 (diff)
downloadsamba-8a6b05d36d460a1814e72f634835604f48f570d9.tar.gz
samba-8a6b05d36d460a1814e72f634835604f48f570d9.tar.bz2
samba-8a6b05d36d460a1814e72f634835604f48f570d9.zip
Add more options to popt_common and use them. Current ones are:
-V Version information -n Set netbios name -l Set directory to store log files in -d Set debuglevel -s Load specified configuration file -O Set socket options (This used to be commit 1602d5894947b59fd36c161053a66c0afe2c959c)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 7aa4479c0f..29caa64abc 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -675,15 +675,12 @@ static BOOL init_structs(void)
{"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" },
{NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug },
{NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile },
- /* Various obsolete options */
- {NULL, 'N', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN },
- {NULL, 'B', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN },
- {NULL, 'I', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN },
- {NULL, 'C', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN },
- {NULL, 'G', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN },
+ {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_socket_options },
+ {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version },
+ {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_netbios_name },
+ {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_log_base },
{ NULL }
};
- extern BOOL append_log;
int opt;
pstring logfile;
@@ -719,24 +716,13 @@ static BOOL init_structs(void)
#if defined(SIGUSR2)
BlockSignals(True, SIGUSR2);
#endif
- pc = poptGetContext(argv[0], argc, argv, long_options, 0);
+ pc = poptGetContext("nmbd", argc, argv, long_options, 0);
while((opt = poptGetNextOpt(pc)) != -1)
- {
- switch (opt)
- {
- case 'N':
- case 'B':
- case 'I':
- case 'C':
- case 'G':
- DEBUG(0,("Obsolete option '%c' used\n",opt));
- break;
- }
- }
+ { }
poptFreeContext(pc);
-
+
setup_logging( argv[0], opt_interactive );
reopen_logs();