]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - util.c
Default to --auto=yes
[thirdparty/mdadm.git] / util.c
diff --git a/util.c b/util.c
index 97707d0df2f7584ffdfe23c18bd4a3ab2a7f93ef..8d06848e60866df42e7ff28d9e0d9858c36c5daf 100644 (file)
--- a/util.c
+++ b/util.c
@@ -179,7 +179,7 @@ int enough(int level, int raid_disks, int layout,
                /* This is the tricky one - we need to check
                 * which actual disks are present.
                 */
-               copies = (layout&255)* (layout>>8);
+               copies = (layout&255)* ((layout>>8) & 255);
                first=0;
                do {
                        /* there must be one of the 'copies' form 'first' */