[DRBD-cvs] user by phil; Removed the unfinishd docs embedded into...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Fri, 6 Feb 2004 14:02:53 +0100 (CET)
DRBD CVS committal
Author : phil
Project : drbd
Module : user
Dir : drbd/user
Modified Files:
Tag: rel-0_7-branch
drbdsetup.c
Log Message:
Removed the unfinishd docs embedded into drbdsetup.
I think the documentation should be in the manpage.
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/user/drbdsetup.c,v
retrieving revision 1.54.2.18
retrieving revision 1.54.2.19
diff -u -3 -r1.54.2.18 -r1.54.2.19
--- drbdsetup.c 5 Feb 2004 17:06:16 -0000 1.54.2.18
+++ drbdsetup.c 6 Feb 2004 13:02:48 -0000 1.54.2.19
@@ -89,7 +89,6 @@
int (* function)(int, char**, int, struct option*);
char **args;
struct option *options;
- char *help;
};
int cmd_primary(int drbd_fd,char** argv,int argc,struct option *options);
@@ -113,27 +112,20 @@
{ "human", no_argument, 0, 'h' },
{ "do-what-I-say",no_argument, 0, 'd' },
{ "timeout-expired",no_argument, 0, 't' },
- { 0, 0, 0, 0 } },
- "FIXME primary help" },
- {"secondary", cmd_secondary, 0, 0,
- "FIXME secondary help" },
- {"secondary_remote", cmd_sec_rem, 0, 0,
- "FIXME secondary_remote help" },
+ { 0, 0, 0, 0 } } },
+ {"secondary", cmd_secondary, 0, 0, },
+ {"secondary_remote", cmd_sec_rem, 0, 0, },
{"wait_sync", cmd_wait_sync, 0,
(struct option[]) {
{ "time", required_argument, 0, 't' },
- { 0, 0, 0, 0 } },
- "FIXME wait_sync help" },
+ { 0, 0, 0, 0 } } },
{"wait_connect", cmd_wait_connect, 0,
(struct option[]) {
{ "wfc-timeout",required_argument, 0, 't' },
{ "degr-wfc-timeout",required_argument,0,'d'},
- { 0, 0, 0, 0 } },
- "FIXME wait_connect help" },
- {"invalidate", cmd_invalidate, 0, 0,
- "FIXME invalidate help" },
- {"invalidate_remote", cmd_invalidate_rem,0, 0,
- "FIXME invalidate_remote help" },
+ { 0, 0, 0, 0 } } },
+ {"invalidate", cmd_invalidate, 0, 0, },
+ {"invalidate_remote", cmd_invalidate_rem,0, 0, },
{"syncer", cmd_syncer, 0,
(struct option[]) {
{ "use-csums", no_argument, 0, 'c' },
@@ -141,10 +133,8 @@
{ "group", required_argument, 0, 'g' },
{ "rate", required_argument, 0, 'r' },
{ "al-extents", required_argument, 0, 'e' },
- { 0, 0, 0, 0 } },
- "FIXME syncer help" },
- {"down", cmd_down, 0, 0,
- "FIXME down help" },
+ { 0, 0, 0, 0 } } },
+ {"down", cmd_down, 0, 0, },
{"net", cmd_net_conf, (char *[]){"local_addr","remote_addr","protocol",0},
(struct option[]) {
{ "timeout", required_argument, 0, 't' },
@@ -153,24 +143,19 @@
{ "connect-int",required_argument, 0, 'c' },
{ "ping-int", required_argument, 0, 'i' },
{ "sndbuf-size",required_argument, 0, 'S' },
- { 0, 0, 0, 0 } },
- "FIXME net help" },
+ { 0, 0, 0, 0 } } },
{"disk", cmd_disk_conf,(char *[]){"lower_dev","meta_data_dev",
"meta_data_index",0},
(struct option[]) {
{ "size", required_argument, 0, 'd' },
{ "do-panic", no_argument, 0, 'p' },
- { 0, 0, 0, 0 } },
- "FIXME disk help" },
+ { 0, 0, 0, 0 } } },
{"resize", cmd_disk_size, 0,
(struct option[]) {
{ "size", required_argument, 0, 'd' },
- { 0, 0, 0, 0 } },
- "FIXME resize help" },
- {"disconnect", cmd_disconnect, 0, 0,
- "FIXME disconnect help" },
- {"show", cmd_show, 0, 0,
- "FIXME show help" },
+ { 0, 0, 0, 0 } } },
+ {"disconnect", cmd_disconnect, 0, 0, },
+ {"show", cmd_show, 0, 0, }
};
unsigned long resolv(const char* name)
@@ -334,11 +319,6 @@
}
line[col]=0;
printf("%s\n",line);
- if (addinfo) {
- printf("%s\n", commands[i].help);
- printf("%s\n", addinfo);
- exit(20);
- }
}
void print_usage(const char* addinfo)
@@ -1162,10 +1142,7 @@
basename = argv[0];
if (argc > 1 && !strcmp(argv[1],"help")) help = 1;
- if (argc < 3)
- print_usage(argc==1 ? 0 :
- help ? "try help <command>"
- : " What??");
+ if (argc < 3) print_usage(argc==1 ? 0 : " Insuficcient arguments");
chdir("/");