]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super0.c
allow add_to_super to return errors
[thirdparty/mdadm.git] / super0.c
index 92255c23cbec0f9f7e1776377bce2db03021a0d2..ab4232b0b5b34d10624e33060a28434e0f68db67 100644 (file)
--- a/super0.c
+++ b/super0.c
@@ -627,7 +627,7 @@ struct devinfo {
 
 #ifndef MDASSEMBLE
 /* Add a device to the superblock being created */
-static void add_to_super0(struct supertype *st, mdu_disk_info_t *dinfo,
+static int add_to_super0(struct supertype *st, mdu_disk_info_t *dinfo,
                          int fd, char *devname)
 {
        mdp_super_t *sb = st->sb;
@@ -652,6 +652,8 @@ static void add_to_super0(struct supertype *st, mdu_disk_info_t *dinfo,
        di->disk = *dinfo;
        di->next = NULL;
        *dip = di;
+
+       return 0;
 }
 #endif