diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2002-08-29 12:44:37 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2002-08-29 12:44:37 +0000 |
commit | e095e77a5c83261a67ec42f37cf2ec6e8f3d545e (patch) | |
tree | 2c06668e69bc551ddf31f13934ee9ef398b545cc | |
parent | 4d64593834eb8c5074a0d7725614b44082ea8eb0 (diff) | |
download | samba-e095e77a5c83261a67ec42f37cf2ec6e8f3d545e.tar.gz samba-e095e77a5c83261a67ec42f37cf2ec6e8f3d545e.tar.bz2 samba-e095e77a5c83261a67ec42f37cf2ec6e8f3d545e.zip |
Forgot to remove old usage() function
(This used to be commit 4631e1fd1039c7eed58d3738bd7310219acc9000)
-rw-r--r-- | source3/rpcclient/rpcclient.c | 32 |
1 files changed, 5 insertions, 27 deletions
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; } |