summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-10-23 08:56:27 +1000
committerNeil Brown <neilb@suse.de>2006-10-23 08:56:27 +1000
commitcbfbcb0b503752a560e607039924f3192fde314b (patch)
tree9088c00bc03172599c0116f7d57aeabff2ecdcd0 /mdadm.c
parent1746711680e1b1790bc6c482b63933385a7ee505 (diff)
downloadmdadm-cbfbcb0b503752a560e607039924f3192fde314b.tar.gz
mdadm-cbfbcb0b503752a560e607039924f3192fde314b.tar.xz
mdadm-cbfbcb0b503752a560e607039924f3192fde314b.zip
Improve error message when wrong --update option is given.
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdadm.c b/mdadm.c
index 00514a6..41e6c4c 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -596,7 +596,13 @@ int main(int argc, char *argv[])
continue;
}
- fprintf(stderr, Name ": '--update %s' invalid. Only 'sparc2.2', 'super-minor', 'uuid', 'resync' or 'summaries' supported\n",update);
+ if (strcmp(update,"?") == 0 || strcmp(update, "help") == 0)
+ fprintf(stderr, Name ": ");
+ else
+ fprintf(stderr, Name ": '--update=%s' is invalid. ", update);
+ fprintf(stderr, "Valid --update options are:\n"
+ " 'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',\n"
+ " 'summaries', 'homehost', 'byteorder'.\n");
exit(2);
case O(ASSEMBLE,NoDegraded): /* --no-degraded */