diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-11-26 23:39:51 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-27 05:30:39 +0100 |
commit | f20c3968363a16f3c8dce5d69863bbb54a4d236e (patch) | |
tree | c96904d976647f1051b9f3dbc2cf72c27b428624 /Create.c | |
parent | Support --wait-clean --scan (diff) | |
download | mdadm-f20c3968363a16f3c8dce5d69863bbb54a4d236e.tar.xz mdadm-f20c3968363a16f3c8dce5d69863bbb54a4d236e.zip |
allow add_to_super to return errors
Prepare add_to_super to validate disks against the platform capabilities
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Create.c')
-rw-r--r-- | Create.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -705,8 +705,12 @@ int Create(struct supertype *st, char *mddev, inf->disk.minor = minor(stb.st_rdev); remove_partitions(fd); - st->ss->add_to_super(st, &inf->disk, - fd, dv->devname); + if (st->ss->add_to_super(st, &inf->disk, + fd, dv->devname)) { + fprintf(stderr, Name ": failed to add %s\n", + dv->devname); + goto abort; + } st->ss->getinfo_super(st, inf); safe_mode_delay = inf->safe_mode_delay; |