summaryrefslogtreecommitdiff
path: root/Create.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-11-26 15:39:51 -0700
committerNeilBrown <neilb@suse.de>2008-11-27 15:30:39 +1100
commitf20c3968363a16f3c8dce5d69863bbb54a4d236e (patch)
treec96904d976647f1051b9f3dbc2cf72c27b428624 /Create.c
parentfabbfd48b6c2398a344d2d4f7cbf0ab98181a6d4 (diff)
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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Create.c b/Create.c
index 783ab09f..424be12c 100644
--- a/Create.c
+++ b/Create.c
@@ -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;