]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.c
Improve error message when wrong --update option is given.
[thirdparty/mdadm.git] / mdadm.c
diff --git a/mdadm.c b/mdadm.c
index 00514a6e694c1d0bf877ac876d927b3f34a6d116..41e6c4c5073ca0f676f1d44013e2ee736bce9006 100644 (file)
--- 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 */