summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-10-13 09:02:35 +1000
committerNeil Brown <neilb@suse.de>2006-10-13 09:02:35 +1000
commit0430ed4868970a9c72318357d30cd0b4d4144407 (patch)
tree663f128d5a4a5f72197f0a6c9b46754a297a0f4b /Assemble.c
parent6ba83b5f5e8946d49877229752e76a14b7672f69 (diff)
downloadmdadm-0430ed4868970a9c72318357d30cd0b4d4144407.tar.gz
mdadm-0430ed4868970a9c72318357d30cd0b4d4144407.tar.xz
mdadm-0430ed4868970a9c72318357d30cd0b4d4144407.zip
Remove partitions from components of an md array
They do nothing but cause confusion.
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Assemble.c b/Assemble.c
index 5acb076..e8fec8e 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -421,6 +421,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
}
dfd = dev_open(devname, O_RDWR|O_EXCL);
+ remove_partitions(dfd);
+
if (super) {
free(super);
super = NULL;
@@ -460,6 +462,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
int dfd;
dfd = dev_open(devname, O_RDWR|O_EXCL);
+ remove_partitions(dfd);
+
if (super) {
free(super);
super = NULL;