]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: fix count in "assembled with .. but not started".
authorNeilBrown <neilb@suse.de>
Thu, 22 Dec 2011 23:49:07 +0000 (10:49 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 22 Dec 2011 23:49:07 +0000 (10:49 +1100)
We need to include the count of pre-existing devices here.

Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index c6ef736d6379b4c20010fccb6d66343c54b23947..fd9446190f7095be870ba080f2498ebe52662584 100644 (file)
@@ -1634,11 +1634,15 @@ int assemble_container_content(struct supertype *st, int mdfd,
                return err;
                /* FIXME should have an O_EXCL and wait for read-auto */
        } else {
-               if (verbose >= 0)
+               if (verbose >= 0) {
                        fprintf(stderr, Name
-                               ": %s assembled with %d device%s but "
-                               "not started\n",
-                               chosen_name, working, working == 1 ? "":"s");
+                               ": %s assembled with %d device%s",
+                               chosen_name, preexist + working,
+                               preexist + working == 1 ? "":"s");
+                       if (preexist)
+                               fprintf(stderr, " (%d new)", working);
+                       fprintf(stderr, " but not started\n");
+               }
                return 1;
        }
 }