]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.c
Central calls to ioctl BLKGETSIZE
[thirdparty/mdadm.git] / mdadm.c
diff --git a/mdadm.c b/mdadm.c
index 41e6c4c5073ca0f676f1d44013e2ee736bce9006..5fb1b8de503efb36725dd5acf88cac0790baf090 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -201,6 +201,7 @@ int main(int argc, char *argv[])
                case 'S':
                case 'o':
                case 'w':
+               case 'W':
                case 'K': if (!mode) newmode = MISC; break;
                }
                if (mode && newmode == mode) {
@@ -582,6 +583,8 @@ int main(int argc, char *argv[])
                                continue;
                        if (strcmp(update, "homehost")==0)
                                continue;
+                       if (strcmp(update, "devicesize")==0)
+                               continue;
                        if (strcmp(update, "byteorder")==0) {
                                if (ss) {
                                        fprintf(stderr, Name ": must not set metadata type with --update=byteorder.\n");
@@ -601,8 +604,8 @@ int main(int argc, char *argv[])
                        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");
+               "     'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',\n"
+               "     'summaries', 'homehost', 'byteorder', 'devicesize'.\n");
                        exit(2);
 
                case O(ASSEMBLE,NoDegraded): /* --no-degraded */
@@ -740,6 +743,7 @@ int main(int argc, char *argv[])
                case O(MISC,'X'):
                case O(MISC,'o'):
                case O(MISC,'w'):
+               case O(MISC,'W'):
                        if (devmode && devmode != opt &&
                            (devmode == 'E' || (opt == 'E' && devmode != 'Q'))) {
                                fprintf(stderr, Name ": --examine/-E cannot be given with -%c\n",
@@ -1136,7 +1140,6 @@ int main(int argc, char *argv[])
                            bitmap_file, bitmap_chunk, write_behind, delay);
                break;
        case MISC:
-
                if (devmode == 'E') {
                        if (devlist == NULL && !scan) {
                                fprintf(stderr, Name ": No devices to examine\n");
@@ -1148,6 +1151,8 @@ int main(int argc, char *argv[])
                                fprintf(stderr, Name ": No devices listed in %s\n", configfile?configfile:DefaultConfFile);
                                exit(1);
                        }
+                       if (brief && verbose)
+                               brief = 2;
                        rv = Examine(devlist, scan?(verbose>1?0:verbose+1):brief, scan, SparcAdjust, ss, homehost);
                } else {
                        if (devlist == NULL) {
@@ -1215,6 +1220,8 @@ int main(int argc, char *argv[])
                                        rv |= Query(dv->devname); continue;
                                case 'X':
                                        rv |= ExamineBitmap(dv->devname, brief, ss); continue;
+                               case 'W':
+                                       rv |= Wait(dv->devname); continue;
                                }
                                mdfd = open_mddev(dv->devname, 1);
                                if (mdfd>=0) {