}
if (st == NULL)
st = guess_super(fd);
- if (st == NULL) {
+ if (st == NULL || st->ss->init_super == NULL) {
if (!quiet)
fprintf(stderr, Name ": Unrecognised md component device - %s\n", dev);
close(fd);
memset(st, 0, sizeof(*st));
- if (snprintf(st->subarray, sizeof(st->subarray), "%s", subarray) >=
- sizeof(st->subarray)) {
- if (!quiet)
- fprintf(stderr,
- Name ": Input overflow for subarray '%s' > %zu bytes\n",
- subarray, sizeof(st->subarray) - 1);
- return 2;
- }
-
- fd = open_subarray(dev, st, quiet);
+ fd = open_subarray(dev, subarray, st, quiet);
if (fd < 0)
return 2;