* Returns:
* 0 - a zero superblock was successfully written out
* 1 - failed to write the zero superblock
- * 2 - failed to open the device or find a superblock.
+ * 2 - failed to open the device.
+ * 4 - failed to find a superblock.
*/
int fd, rv = 0;
if (verbose >= 0)
pr_err("Unrecognised md component device - %s\n", dev);
close(fd);
- return 2;
+ return 4;
}
st->ignore_hw_compat = 1;
rv = st->ss->load_super(st, fd, dev);
if (rv == 0 || (force && rv >= 2)) {
st->ss->free_super(st);
- st->ss->init_super(st, NULL, 0, "", NULL, NULL);
+ st->ss->init_super(st, NULL, NULL, "", NULL, NULL,
+ INVALID_SECTORS);
if (st->ss->store_super(st, fd)) {
if (verbose >= 0)
pr_err("Could not zero superblock on %s\n",
goto free_super;
}
- if (is_subarray_active(subarray, st->devname)) {
+ if (is_subarray_active(subarray, st->devnm)) {
if (verbose >= 0)
pr_err("Subarray-%s still active, aborting\n",
subarray);
goto free_super;
}
- if (mdmon_running(st->devnum))
+ if (mdmon_running(st->devnm))
st->update_tail = &st->updates;
/* ok we've found our victim, drop the axe */