diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2003-03-23 12:40:48 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2003-03-23 12:40:48 +0000 |
commit | be47eb50324ed97a30410af8e08b1426b4a0262a (patch) | |
tree | b38f228c54003cd771db57c0f1bbd047743fbaa6 | |
parent | 477e1a8cee99fea4dc9d1ce2878569cc39a50db2 (diff) | |
download | samba-be47eb50324ed97a30410af8e08b1426b4a0262a.tar.gz samba-be47eb50324ed97a30410af8e08b1426b4a0262a.tar.bz2 samba-be47eb50324ed97a30410af8e08b1426b4a0262a.zip |
Use popt_common for -s, -d and -V
(This used to be commit a1576694a6f23e1c70d7d81ac4feedd4f29c5400)
-rw-r--r-- | source3/utils/net.c | 19 | ||||
-rw-r--r-- | source3/utils/net_help.c | 5 |
2 files changed, 8 insertions, 16 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index f6b3c5c84c..33c125901b 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -78,8 +78,6 @@ static int opt_machine_pass = 0; BOOL opt_have_ip = False; struct in_addr opt_dest_ip; -extern BOOL AllowDebugChange; - /* run a function from a function table. If not found then call the specified usage function @@ -513,8 +511,6 @@ static struct functable net_func[] = { int argc_new = 0; const char ** argv_new; poptContext pc; - static char *servicesf = dyn_CONFIGFILE; - static char *debuglevel = NULL; struct poptOption long_options[] = { {"help", 'h', POPT_ARG_NONE, 0, 'h'}, @@ -524,7 +520,6 @@ static struct functable net_func[] = { {"ipaddress", 'I', POPT_ARG_STRING, 0,'I'}, {"port", 'p', POPT_ARG_INT, &opt_port}, {"myname", 'n', POPT_ARG_STRING, &opt_requester_name}, - {"conf", 's', POPT_ARG_STRING, &servicesf}, {"server", 'S', POPT_ARG_STRING, &opt_host}, {"container", 'c', POPT_ARG_STRING, &opt_container}, {"comment", 'C', POPT_ARG_STRING, &opt_comment}, @@ -536,8 +531,9 @@ static struct functable net_func[] = { {"force", 'f', POPT_ARG_NONE, &opt_force}, {"timeout", 't', POPT_ARG_INT, &opt_timeout}, {"machine-pass",'P', POPT_ARG_NONE, &opt_machine_pass}, - {"debuglevel", 'd', POPT_ARG_STRING, &debuglevel}, - {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version}, + POPT_COMMON_SAMBA + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile }, { 0, 0, 0, 0} }; @@ -577,13 +573,8 @@ static struct functable net_func[] = { exit(1); } } - - if (debuglevel) { - debug_parse_levels(debuglevel); - AllowDebugChange = False; - } - - lp_load(servicesf,True,False,False); + + lp_load(dyn_CONFIGFILE,True,False,False); argv_new = (const char **)poptGetArgs(pc); diff --git a/source3/utils/net_help.c b/source3/utils/net_help.c index 4000a248ff..07409aec22 100644 --- a/source3/utils/net_help.c +++ b/source3/utils/net_help.c @@ -42,11 +42,12 @@ int net_common_flags_usage(int argc, const char **argv) d_printf("Valid miscellaneous options are:\n"); /* misc options */ d_printf("\t-p or --port=<port>\t\tconnection port on target\n"); d_printf("\t-W or --myworkgroup=<wg>\tclient workgroup\n"); - d_printf("\t-d or --debug=<level>\t\tdebug level (0-10)\n"); + d_printf("\t-d or --debuglevel=<level>\t\tdebug level (0-10)\n"); d_printf("\t-n or --myname=<name>\t\tclient name\n"); d_printf("\t-U or --user=<name>\t\tuser name\n"); - d_printf("\t-s or --conf=<path>\t\tpathname of smb.conf file\n"); + d_printf("\t-s or --configfile=<path>\t\tpathname of smb.conf file\n"); d_printf("\t-l or --long\t\t\tDisplay full information\n"); + d_printf("\t-V or --version\t\tPrint samba version information\n"); d_printf("\t-P or --machine-pass\t\tAuthenticate as machine account\n"); return -1; } |