- next_member:
- if (tmpdev->content)
- content = tmpdev->content;
- else
- content = tst->ss->container_content(tst);
- if (!content)
- goto loop; /* empty container */
-
- tmpdev->content = content->next;
- if (tmpdev->content == NULL)
- tmpdev->used = 2;
-
- } else if (ident->container || ident->member) {
- /* No chance of this matching if we don't have
- * a container */
- if (report_missmatch)
- fprintf(stderr, Name "%s is not a container, and one is required.\n",
- devname);
- goto loop;
- }
-
- if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
- (!tst || !tst->sb ||
- same_uuid(content->uuid, ident->uuid, tst->ss->swapuuid)==0)) {
- if (report_missmatch)
- fprintf(stderr, Name ": %s has wrong uuid.\n",
- devname);
- goto loop;
- }
- if (ident->name[0] && (!update || strcmp(update, "name")!= 0) &&
- (!tst || !tst->sb ||
- name_matches(content->name, ident->name, homehost)==0)) {
- if (report_missmatch)
- fprintf(stderr, Name ": %s has wrong name.\n",
- devname);
- goto loop;
- }
- if (ident->super_minor != UnSet &&
- (!tst || !tst->sb ||
- ident->super_minor != content->array.md_minor)) {
- if (report_missmatch)
- fprintf(stderr, Name ": %s has wrong super-minor.\n",
- devname);
- goto loop;
- }
- if (ident->level != UnSet &&
- (!tst || !tst->sb ||
- ident->level != content->array.level)) {
- if (report_missmatch)
- fprintf(stderr, Name ": %s has wrong raid level.\n",
- devname);
- goto loop;
- }
- if (ident->raid_disks != UnSet &&
- (!tst || !tst->sb ||
- ident->raid_disks!= content->array.raid_disks)) {
- if (report_missmatch)
- fprintf(stderr, Name ": %s requires wrong number of drives.\n",
- devname);
- goto loop;
- }
- if (auto_assem) {
- if (tst == NULL || tst->sb == NULL)
- continue;
- }
- /* If we are this far, then we are nearly commited to this device.
- * If the super_block doesn't exist, or doesn't match others,
- * then we probably cannot continue
- * However if one of the arrays is for the homehost, and
- * the other isn't that can disambiguate.
- */