Verified exists in 3.1.4 and 3.2.2.
Attached patch is against 3.2.2 code.
Description: mdadm -e 1 incorrectly treated as 1.2 ("default")
Forwarded: TBD
Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607375
Bug-Debian: http://bugs.debian.org/607375
Author: Scott Schaefer <[email protected]>
Last-Update: 2011-07-30
diff --git a/super1.c b/super1.c
--- a/super1.c
+++ b/super1.c
@@ -1369,7 +1369,8 @@
/* leading zeros can be safely ignored. --detail generates them. */
while (*arg == '0')
arg++;
- if (strcmp(arg, "1.0") == 0 ||
+ if (strcmp(arg, "1") == 0 ||
+ strcmp(arg, "1.0") == 0 ||
strcmp(arg, "1.00") == 0) {
st->minor_version = 0;
return st;
@@ -1388,8 +1389,7 @@
st->minor_version = 2;
return st;
}
- if (strcmp(arg, "1") == 0 ||
- strcmp(arg, "default") == 0) {
+ if (strcmp(arg, "default") == 0) {
st->minor_version = -1;
return st;
}