From 85ecf66547e8e86bfd9726d7a08a67cb37672b30 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Tue, 21 Jan 2003 14:08:33 +0000 Subject: Properly display popt errors. Also fix debug to be -d for consistency with other progs. (This used to be commit c58c84e8066d5d17e1cde99b83d259030f15458b) --- source3/utils/net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/utils/net.c b/source3/utils/net.c index 5c1156abf9..33195375f5 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -536,7 +536,7 @@ 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}, + {"debuglevel", 'd', POPT_ARG_STRING, &debuglevel}, { 0, 0, 0, 0} }; @@ -570,7 +570,8 @@ static struct functable net_func[] = { } break; default: - d_printf("\nInvalid option %c (%d)\n", (char)opt, opt); + d_printf("\nInvalid option %s: %s\n", + poptBadOption(pc, 0), poptStrerror(opt)); net_help(argc, argv); exit(1); } -- cgit