Revised patch vs latest upstream git commit, and emailed direct to Neil
Brown.
He has been 1-2 steps ahead of me on others, and yet no response from
him on this one; I am assuming he just missed it.
Description: mdadm -e 1 incorrectly treated as 1.2 ("default")
Forwarded: 2011-09-19
Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607375
Bug-Debian: http://bugs.debian.org/607375
Author: Scott Schaefer <saschae...@neurodiverse.org>
Last-Update: 2011-09-19
diff --git a/super1.c b/super1.c
index 0cd4124..f66e8e5 100644
--- a/super1.c
+++ b/super1.c
@@ -1398,7 +1398,8 @@ static struct supertype *match_metadata_desc1(char *arg)
/* 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;
@@ -1417,8 +1418,7 @@ static struct supertype *match_metadata_desc1(char *arg)
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;
}