]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super1.c
allow add_to_super to return errors
[thirdparty/mdadm.git] / super1.c
index 3d392cb05c996dc96f0156c11dd0103707e10be6..9446948ab3cde218f0e3b487a8db599aae03fd26 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -796,7 +796,7 @@ struct devinfo {
 };
 #ifndef MDASSEMBLE
 /* Add a device to the superblock being created */
-static void add_to_super1(struct supertype *st, mdu_disk_info_t *dk,
+static int add_to_super1(struct supertype *st, mdu_disk_info_t *dk,
                          int fd, char *devname)
 {
        struct mdp_superblock_1 *sb = st->sb;
@@ -822,6 +822,8 @@ static void add_to_super1(struct supertype *st, mdu_disk_info_t *dk,
        di->disk = *dk;
        di->next = NULL;
        *dip = di;
+
+       return 0;
 }
 #endif