}
if (dfd >= 0) close(dfd);
if (tmpdev->used == 2) {
- if (auto_assem)
+ if (auto_assem || !inargv)
/* Ignore unrecognised devices during auto-assembly */
goto loop;
if (ident->uuid_set || ident->name[0] ||
} else {
struct dev_policy *pol = NULL;
pol = devnum_policy(stb.st_rdev);
- if (domain_test(domains, pol, NULL))
+ if (domain_test(domains, pol, NULL) == 1)
/* take this spare if domains match */
tmpdev->used = 1;
else
content->array.raid_disks);
fprintf(stderr, "\n");
}
+ st->ss->free_super(st);
sysfs_uevent(content, "change");
wait_for(chosen_name, mdfd);
close(mdfd);