summaryrefslogtreecommitdiffstats
path: root/Build.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build.c')
-rw-r--r--Build.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Build.c b/Build.c
index 789aca4..d831e55 100644
--- a/Build.c
+++ b/Build.c
@@ -60,6 +60,8 @@ int Build(char *mddev, int chunk, int level, int layout,
unsigned long long size = ~0ULL;
unsigned long long bitmapsize;
int mdfd;
+ char chosen_name[1024];
+ int uuid[4] = {0,0,0,0};
/* scan all devices, make sure they really are block devices */
for (dv = devlist; dv; dv=dv->next) {
@@ -114,10 +116,13 @@ int Build(char *mddev, int chunk, int level, int layout,
}
/* We need to create the device. It can have no name. */
- mdfd = create_mddev(mddev, NULL, autof, LOCAL, NULL);
+ mdfd = create_mddev(mddev, NULL, autof, LOCAL,
+ chosen_name);
if (mdfd < 0)
return 1;
+ map_update(NULL, fd2devnum(mdfd), "none", uuid, chosen_name);
+
vers = md_get_version(mdfd);
/* looks Ok, go for it */