]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - lib.c
mdadm: define DEV_MD_DIR
[thirdparty/mdadm.git] / lib.c
diff --git a/lib.c b/lib.c
index e395b28d7d078476013cc555441f45810c1eb29c..65ea51e0d66a723ca78cbe3cddbd1b6d52703c91 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -313,7 +313,7 @@ char *map_dev_preferred(int major, int minor, int create,
 
        for (p = devlist; p; p = p->next)
                if (p->major == major && p->minor == minor) {
-                       if (strncmp(p->name, "/dev/md/",8) == 0 ||
+                       if (strncmp(p->name, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0 ||
                            (prefer && strstr(p->name, prefer))) {
                                if (preferred == NULL ||
                                    strlen(p->name) < strlen(preferred))