]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Fix parsing of /dev/md/N in is_standard
authorNeil Brown <neilb@suse.de>
Tue, 14 Jun 2005 06:33:24 +0000 (06:33 +0000)
committerNeil Brown <neilb@suse.de>
Tue, 14 Jun 2005 06:33:24 +0000 (06:33 +0000)
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
ChangeLog
util.c

index 6e55e62cd65e688f45c5338af4cd66823038a907..d045ec02be82e455edb365e0680fef5a43007425 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@ Changes Prior to this release
        value when running "--assemble --scan".  Previously
        --auto was ignored if --scan was given
     -   Fix a few type casts
+    -   Fix parsing of /dev/md/N in is_standard
        
 Changes Prior to 1.11.0 release
     -   Fix embarassing bug which causes --add to always fail.
diff --git a/util.c b/util.c
index c349df8d23c4a0262fd5c3733dc9951f1861e602..8febfd2c0ab6e0ff5a3aa23b7ac4d0c912b22221 100644 (file)
--- a/util.c
+++ b/util.c
@@ -284,7 +284,7 @@ int is_standard(char *dev, int *nump)
        else if (strncmp(d, "/md", 3)==0)
                d += 3, type=-1; /* /dev/mdN */
        else if (d-dev > 3 && strncmp(d-2, "md/", 3)==0)
-               type = -1; /* /dev/md/N */
+               d += 1, type=-1; /* /dev/md/N */
        else
                return 0;
        if (!*d)