From e095e77a5c83261a67ec42f37cf2ec6e8f3d545e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 29 Aug 2002 12:44:37 +0000 Subject: Forgot to remove old usage() function (This used to be commit 4631e1fd1039c7eed58d3738bd7310219acc9000) --- source3/rpcclient/rpcclient.c | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 470ff7c1e3..5f15c57577 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -573,23 +573,6 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) } -/* Print usage information */ -static void usage(void) -{ - printf("Usage: rpcclient [options] server\n"); - - printf("\t-c or --command \"command string\" Execute semicolon separated cmds\n"); - printf("\t-d or --debug debuglevel Set the debuglevel\n"); - printf("\t-l or --logfile logfile Logfile to use instead of stdout\n"); - printf("\t-h or --help Print this help message.\n"); - printf("\t-N or --nopass Don't ask for a password\n"); - printf("\t-s or --conf configfile Specify an alternative config file\n"); - printf("\t-U or --user username Set the network username\n"); - printf("\t-W or --workgroup domain Set the domain name for user account\n"); - printf("\t-I or --dest-ip ip Specify destination IP address\n"); - printf("\n"); -} - /* Main function */ int main(int argc, char *argv[]) @@ -641,14 +624,14 @@ static void usage(void) /* Parse options */ + pc = poptGetContext("rpcclient", argc, (const char **) argv, + long_options, 0); + if (argc == 1) { - usage(); + poptPrintHelp(pc, stderr, 0); return 0; } - pc = poptGetContext("rpcclient", argc, (const char **) argv, - long_options, 0); - while((opt = poptGetNextOpt(pc)) != -1) { switch (opt) { case 'A': @@ -692,11 +675,6 @@ static void usage(void) case 'W': pstrcpy(domain, opt_domain); break; - - case 'h': - default: - usage(); - exit(1); } } @@ -706,7 +684,7 @@ static void usage(void) server = poptGetArg(pc); if (!server || poptGetArg(pc)) { - usage(); + poptPrintHelp(pc, stderr, 0); return 1; } -- cgit