]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mapfile.c
imsm: do not use blocks_per_member in array size calculations
[thirdparty/mdadm.git] / mapfile.c
index 41599df05f979c22136b0084bca1f776ed15f0c5..f3c8191e80b7485760152db11df90bb2548c70f8 100644 (file)
--- a/mapfile.c
+++ b/mapfile.c
@@ -176,7 +176,7 @@ void map_read(struct map_ent **melp)
 {
        FILE *f;
        char buf[8192];
-       char path[200];
+       char path[201];
        int uuid[4];
        char devnm[32];
        char metadata[30];
@@ -374,7 +374,7 @@ void RebuildMap(void)
                        char dn[30];
                        int dfd;
                        int ok;
-                       int devid;
+                       dev_t devid;
                        struct supertype *st;
                        char *subarray = NULL;
                        char *path;
@@ -439,8 +439,8 @@ void RebuildMap(void)
                                        if ((homehost == NULL ||
                                             st->ss->match_home(st, homehost) != 1) &&
                                            st->ss->match_home(st, "any") != 1 &&
-                                           (require_homehost
-                                            || ! conf_name_is_free(info->name)))
+                                           (require_homehost ||
+                                            !conf_name_is_free(info->name)))
                                                /* require a numeric suffix */
                                                unum = 0;
                                        else