diff options
author | NeilBrown <neilb@suse.de> | 2009-05-11 07:58:44 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-05-11 07:58:44 +0200 |
commit | 9a40c32728dceb66bac603e96656223944b6c7d4 (patch) | |
tree | 32b0e0a11581bdb9fcc42cc7e2bf7cec020e1555 /mdopen.c | |
parent | mapfile - when rebuilding, choose an appropriate name is none is found. (diff) | |
download | mdadm-9a40c32728dceb66bac603e96656223944b6c7d4.tar.xz mdadm-9a40c32728dceb66bac603e96656223944b6c7d4.zip |
create_mddev: don't replace /dev/mdX with /dev/md/X
If someone creates/assemble an array called "/dev/md0", don't force
it to be "/dev/md/0". Doing so isn't really necessary and it
likely to confuse people.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdopen.c')
-rw-r--r-- | mdopen.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -311,7 +311,10 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy, conflict = 0; } } - if (cname[0] == 0) + + if (dev) + strcpy(chosen, dev); + else if (cname[0] == 0) strcpy(chosen, devname); /* We have a device number and name. |