]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-mbr.c
imsm: do not activate spares for uninitialized member arrays
[thirdparty/mdadm.git] / super-mbr.c
index 8b175e3185128054ec69e0b0f0a5873b3aa6c7a5..62b3f03126cbda2a3a19af14cb123f2646cfff7f 100644 (file)
@@ -81,8 +81,7 @@ static int load_super_mbr(struct supertype *st, int fd, char *devname)
        free_mbr(st);
 
        if (posix_memalign((void**)&super, 512, 512) != 0) {
-               pr_err("%s could not allocate superblock\n",
-                       __func__);
+               pr_err("could not allocate superblock\n");
                return 1;
        }
 
@@ -94,7 +93,7 @@ static int load_super_mbr(struct supertype *st, int fd, char *devname)
                free(super);
                return 1;
        }
+
        if (super->magic != MBR_SIGNATURE_MAGIC) {
                if (devname)
                        pr_err("No partition table found on %s\n",
@@ -119,8 +118,7 @@ static int store_mbr(struct supertype *st, int fd)
        struct MBR *old, *super;
 
        if (posix_memalign((void**)&old, 512, 512) != 0) {
-               pr_err("%s could not allocate superblock\n",
-                       __func__);
+               pr_err("could not allocate superblock\n");
                return 1;
        }
 
@@ -154,7 +152,7 @@ static void getinfo_mbr(struct supertype *st, struct mdinfo *info, char *map)
 
        for (i = 0; i < MBR_PARTITIONS ; i++)
                if (sb->parts[i].blocks_num) {
-                       unsigned long last = 
+                       unsigned long last =
                                (unsigned long)__le32_to_cpu(sb->parts[i].blocks_num)
                                + (unsigned long)__le32_to_cpu(sb->parts[i].first_sect_lba);
                        if (last > info->component_size)