From bb38f48f6f2b5a5b8803c622e40107bb15876625 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 15 Mar 2002 20:03:07 +0000 Subject: Some help cleanups. Formatting and consistency issues. Line up text nicely, and make 'net help rap user' the same as 'net rap user help'...stuff like that (This used to be commit 17775dae28c724b11cc73f2aeac5f07f9656046c) --- source3/utils/net.c | 72 ++++++++++++++++++++++++++++++---------------- source3/utils/net_lookup.c | 2 +- source3/utils/net_rap.c | 70 ++++++++++++-------------------------------- source3/utils/net_rpc.c | 44 ++++++++++++++++++++++++---- source3/utils/net_time.c | 3 +- 5 files changed, 108 insertions(+), 83 deletions(-) (limited to 'source3') diff --git a/source3/utils/net.c b/source3/utils/net.c index aac5235ac8..a8ef721512 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -79,6 +79,27 @@ struct in_addr opt_dest_ip; extern pstring global_myname; +int net_common_flags_usage(int argc, const char **argv) +{ + + d_printf("Valid targets: choose one (none defaults to localhost)\n"); + d_printf("\t-S or --server=\t\tserver name\n"); + d_printf("\t-I or --ipaddress=\taddress of target server\n"); + d_printf("\t-w or --workgroup=\t\ttarget workgroup or domain\n"); + + d_printf("\n"); + d_printf("Valid miscellaneous options are:\n"); /* misc options */ + d_printf("\t-p or --port=\tconnection port on target server\n"); + d_printf("\t-W or --myworkgroup=\tclient workgroup\n"); + d_printf("\t-d or --debug=\t\tdebug level (0-10)\n"); + d_printf("\t-n or --myname=\t\tclient name\n"); + d_printf("\t-U or --user=\t\tuser name\n"); + d_printf("\t-s or --conf=\t\tpathname of smb.conf file\n"); + d_printf("\t-l or --long\t\t\tDisplay full information\n"); + return -1; +} + + /* run a function from a function table. If not found then call the specified usage function @@ -283,11 +304,14 @@ struct cli_state *net_make_ipc_connection(unsigned flags) static int net_usage(int argc, const char **argv) { - d_printf(" net ads [command]\tto run ADS commands\n"\ + d_printf(" net time\t\t to view or set time information\n"\ + " net lookup\t\t to lookup host name or ip address\n"\ + "\n"\ + " net ads [command]\tto run ADS commands\n"\ " net rap [command]\tto run RAP (pre-RPC) commands\n"\ " net rpc [command]\tto run RPC commands\n"\ - " net rap help\n"\ - "\nType \"net help