]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdopen.c
create_dev - allow array names like mdX and /dev/mdX to appear 'numeric'
authorNeilBrown <neilb@suse.de>
Mon, 11 May 2009 05:16:47 +0000 (15:16 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 11 May 2009 05:16:47 +0000 (15:16 +1000)
commitd7ba0c55f07d24b51e6da1a5850d7164e9cf01d9
tree428d877e17862c20118b1e5f7b0570af7c642abd
parent2800528713cd32a4d12d7e17c14eba34eb8a4ec2
create_dev - allow array names like mdX and /dev/mdX to appear 'numeric'

When choosing the minor number to use with an array, we currently base
the number of the 'name' stored in the metadata if that name is
numeric.
Extend that so that if it looks like a number md device name (/dev/md0
or just md0 or even /dev/md/0), then we use the number at the end to
suggest a minor number.

The means that if someone creates and array with "--name md0" or even
"--name /dev/md0" it will continue to do what they expect.

Signed-off-by: NeilBrown <neilb@suse.de>
mdopen.c