]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - config.c
Create: fix regression in setting raid_disk
[thirdparty/mdadm.git] / config.c
index 21b6afd37d079127bedf281f13798da374a646d8..c58c8fe62424301013572a6103f4d801cdf69f5a 100644 (file)
--- a/config.c
+++ b/config.c
@@ -168,10 +168,10 @@ struct mddev_dev *load_containers(void)
                    !is_subarray(&ent->metadata_version[9])) {
                        d = xmalloc(sizeof(*d));
                        memset(d, 0, sizeof(*d));
-                       me = map_by_devnm(&map, ent->dev);
+                       me = map_by_devnm(&map, ent->devnm);
                        if (me)
                                d->devname = xstrdup(me->path);
-                       else if (asprintf(&d->devname, "/dev/%s", ent->dev) < 0) {
+                       else if (asprintf(&d->devname, "/dev/%s", ent->devnm) < 0) {
                                free(d);
                                continue;
                        }