From cbfbcb0b503752a560e607039924f3192fde314b Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 23 Oct 2006 08:56:27 +1000 Subject: Improve error message when wrong --update option is given. --- mdadm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mdadm.c') 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 */ -- cgit