diff options
-rw-r--r-- | Assemble.c | 15 | ||||
-rw-r--r-- | config.c | 3 | ||||
-rw-r--r-- | mdadm.c | 2 | ||||
-rw-r--r-- | mdadm.h | 2 |
4 files changed, 7 insertions, 15 deletions
@@ -391,22 +391,21 @@ int Assemble(struct supertype *st, char *mddev, fprintf(stderr, Name ": looking in container %s\n", devname); - tmpdev->content = tst->ss->container_content(tst, NULL); + content = tst->ss->container_content(tst, NULL); next_member: - if (tmpdev->content) - content = tmpdev->content; if (!content) goto loop; /* empty container */ - tmpdev->content = content->next; - if (tmpdev->content == NULL) + if (content->next == NULL) tmpdev->used = 2; if (!ident_matches(ident, content, tst, homehost, update, - report_missmatch ? devname : NULL)) + report_missmatch ? devname : NULL)) { + content = content->next; goto next_member; + } /* we have the one container we need, don't keep * looking. If the chosen member is active, skip. @@ -417,11 +416,11 @@ int Assemble(struct supertype *st, char *mddev, content->text_version, devname); skip: - if (tmpdev->content) + content = content->next; + if (content) goto next_member; tst->ss->free_super(tst); tst = NULL; - content = NULL; if (auto_assem) goto loop; dev_policy_free(pol); @@ -260,7 +260,6 @@ struct mddev_dev *load_partitions(void) d->devname = strdup(name); d->next = rv; d->used = 0; - d->content = NULL; rv = d; } fclose(f); @@ -290,7 +289,6 @@ struct mddev_dev *load_containers(void) } d->next = rv; d->used = 0; - d->content = NULL; rv = d; } free_mdstat(mdstat); @@ -964,7 +962,6 @@ struct mddev_dev *conf_get_devs() t->devname = strdup(globbuf.gl_pathv[i]); t->next = dlist; t->used = 0; - t->content = NULL; dlist = t; /* printf("one dev is %s\n", t->devname);*/ } @@ -265,7 +265,6 @@ int main(int argc, char *argv[]) dv->writemostly = writemostly; dv->re_add = re_add; dv->used = 0; - dv->content = NULL; dv->next = NULL; *devlistend = dv; devlistend = &dv->next; @@ -320,7 +319,6 @@ int main(int argc, char *argv[]) dv->writemostly = writemostly; dv->re_add = re_add; dv->used = 0; - dv->content = NULL; dv->next = NULL; *devlistend = dv; devlistend = &dv->next; @@ -337,8 +337,6 @@ struct mddev_dev { char writemostly; /* 1 for 'set writemostly', 2 for 'clear writemostly' */ char re_add; char used; /* set when used */ - struct mdinfo *content; /* If devname is a container, this might list - * the remaining member arrays. */ struct mddev_dev *next; }; |