X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=super-ddf.c;h=3c97bb678b70161ca34eebc5228b0d4e80677058;hb=f20c3968363a16f3c8dce5d69863bbb54a4d236e;hp=3e78ffca10a914960214d09f028833a8e7a288a0;hpb=fabbfd48b6c2398a344d2d4f7cbf0ab98181a6d4;p=thirdparty%2Fmdadm.git diff --git a/super-ddf.c b/super-ddf.c index 3e78ffca..3c97bb67 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -2050,7 +2050,7 @@ static void add_to_super_ddf_bvd(struct supertype *st, /* add a device to a container, either while creating it or while * expanding a pre-existing container */ -static void add_to_super_ddf(struct supertype *st, +static int add_to_super_ddf(struct supertype *st, mdu_disk_info_t *dk, int fd, char *devname) { struct ddf_super *ddf = st->sb; @@ -2064,7 +2064,7 @@ static void add_to_super_ddf(struct supertype *st, if (ddf->currentconf) { add_to_super_ddf_bvd(st, dk, fd, devname); - return; + return 0; } /* This is device numbered dk->number. We need to create @@ -2076,7 +2076,7 @@ static void add_to_super_ddf(struct supertype *st, fprintf(stderr, Name ": %s could allocate buffer for new disk, aborting\n", __func__); - abort(); + return 1; } dd->major = major(stb.st_rdev); dd->minor = minor(stb.st_rdev); @@ -2147,6 +2147,8 @@ static void add_to_super_ddf(struct supertype *st, ddf->dlist = dd; ddf->updates_pending = 1; } + + return 0; } /*