summaryrefslogtreecommitdiff
path: root/source3/lib/popt_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/popt_common.c')
-rw-r--r--source3/lib/popt_common.c53
1 files changed, 7 insertions, 46 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index aaec448762..21ee94d2e6 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -23,12 +23,9 @@
#include "includes.h"
/* Handle command line options:
- * d,--debuglevel
- * s,--configfile
- * O,--socket-options
- * V,--version
- * l,--log-base
- * n,--netbios-name
+ * -d,--debuglevel
+ * -s,--configfile
+ * -O,--socket-options
*/
extern pstring user_socket_options;
@@ -40,23 +37,6 @@ static void popt_common_callback(poptContext con,
const struct poptOption *opt,
const char *arg, const void *data)
{
- pstring logfile;
- const char *pname;
-
- /* Find out basename of current program */
- pname = strrchr_m(poptGetInvocationName(con),'/');
-
- if (!pname)
- pname = poptGetInvocationName(con);
- else
- pname++;
-
- if (reason == POPT_CALLBACK_REASON_PRE) {
- pstr_sprintf(logfile, "%s/log.%s", dyn_LOGFILEBASE, pname);
- lp_set_logfile(logfile);
- return;
- }
-
switch(opt->val) {
case 'd':
if (arg) {
@@ -71,29 +51,16 @@ static void popt_common_callback(poptContext con,
break;
case 'O':
- if (arg) {
- pstrcpy(user_socket_options,arg);
- }
+ pstrcpy(user_socket_options,arg);
break;
case 's':
- if (arg) {
- pstrcpy(dyn_CONFIGFILE, arg);
- }
+ pstrcpy(dyn_CONFIGFILE, arg);
break;
case 'n':
- if (arg) {
- pstrcpy(global_myname,arg);
- strupper(global_myname);
- }
- break;
-
- case 'l':
- if (arg) {
- pstr_sprintf(logfile, "%s/log.%s", arg, pname);
- lp_set_logfile(logfile);
- }
+ pstrcpy(global_myname,arg);
+ strupper(global_myname);
break;
}
}
@@ -128,9 +95,3 @@ struct poptOption popt_common_netbios_name[] = {
{"netbiosname", 'n', POPT_ARG_STRING, NULL, 'n', "Primary netbios name"},
{ 0 }
};
-
-struct poptOption popt_common_log_base[] = {
- { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, popt_common_callback },
- { "log-basename", 'l', POPT_ARG_STRING, NULL, 'l', "Basename for log/debug files"},
- { 0 }
-};