#include "mdadm.h"
-#define REGISTER_DEV _IO (MD_MAJOR, 1)
-#define START_MD _IO (MD_MAJOR, 2)
-#define STOP_MD _IO (MD_MAJOR, 3)
+#define REGISTER_DEV _IO (MD_MAJOR, 1)
+#define START_MD _IO (MD_MAJOR, 2)
+#define STOP_MD _IO (MD_MAJOR, 3)
int Build(char *mddev, struct mddev_dev *devlist,
struct shape *s, struct context *c)
}
mddev = chosen_name;
- map_update(&map, fd2devnum(mdfd), "none", uuid, chosen_name);
+ map_update(&map, fd2devnm(mdfd), "none", uuid, chosen_name);
map_unlock(&map);
vers = md_get_version(mdfd);
if (vers >= 9000) {
mdu_array_info_t array;
array.level = s->level;
- array.size = s->size == MAX_SIZE ? 0 : s->size;
+ if (s->size == MAX_SIZE)
+ s->size = 0;
+ array.size = s->size;
array.nr_disks = s->raiddisks;
array.raid_disks = s->raiddisks;
array.md_minor = 0;
goto abort;
}
+ if (s->bitmap_file && strcmp(s->bitmap_file, "none") == 0)
+ s->bitmap_file = NULL;
if (s->bitmap_file && s->level <= 0) {
pr_err("bitmaps not meaningful with level %s\n",
map_num(pers, s->level)?:"given");
goto abort;
}
if ((stb.st_mode & S_IFMT)!= S_IFBLK) {
- pr_err("Wierd: %s is no longer a block device.\n",
+ pr_err("Weird: %s is no longer a block device.\n",
dv->devname);
goto abort;
}
pr_err("RUN_ARRAY failed: %s\n",
strerror(errno));
if (s->chunk & (s->chunk-1)) {
- cont_err("Problem may be that chunk size"
- " is not a power of 2\n");
+ cont_err("Problem may be that chunk size is not a power of 2\n");
}
goto abort;
}