From 56eedc1a3f077e1822a4ee0889a78d89e834b037 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 12 Mar 2003 22:24:39 +0000 Subject: mdadm-1.2.0 --- mdadm.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'mdadm.c') diff --git a/mdadm.c b/mdadm.c index d86d1a5..5c8e956 100644 --- a/mdadm.c +++ b/mdadm.c @@ -101,14 +101,18 @@ int main(int argc, char *argv[]) switch(opt) { case 'h': help_text = Help; - switch (mode) { - case ASSEMBLE : help_text = Help_assemble; break; - case BUILD : help_text = Help_build; break; - case CREATE : help_text = Help_create; break; - case MANAGE : help_text = Help_manage; break; - case MISC : help_text = Help_misc; break; - case MONITOR : help_text = Help_monitor; break; - } + if (option_index > 0 && + strcmp(long_options[option_index].name, "help-options")==0) + help_text = OptionHelp; + else + switch (mode) { + case ASSEMBLE : help_text = Help_assemble; break; + case BUILD : help_text = Help_build; break; + case CREATE : help_text = Help_create; break; + case MANAGE : help_text = Help_manage; break; + case MISC : help_text = Help_misc; break; + case MONITOR : help_text = Help_monitor; break; + } fputs(help_text,stderr); exit(0); -- cgit