summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-10-13 08:23:16 +1000
committerNeil Brown <neilb@suse.de>2006-10-13 08:23:16 +1000
commit6ba83b5f5e8946d49877229752e76a14b7672f69 (patch)
tree1455972e97c8b43ce11cb4dd7318e03439c06397 /config.c
parentd2df86e0a79c1e3d86c19d6ecb14e6f303c5d50d (diff)
downloadmdadm-6ba83b5f5e8946d49877229752e76a14b7672f69.tar.gz
mdadm-6ba83b5f5e8946d49877229752e76a14b7672f69.tar.xz
mdadm-6ba83b5f5e8946d49877229752e76a14b7672f69.zip
Allow a number after --auto=yes
So if the device name is /dev/md/d0, then the number of partitions is as given. This is useful in 'CREATE' in mdadm.conf
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.c b/config.c
index 219308d..d251fbf 100644
--- a/config.c
+++ b/config.c
@@ -291,6 +291,8 @@ int parse_auto(char *str, char *msg, int config)
len = e - str;
if ((len == 2 && strncasecmp(str,"md",2)==0)) {
autof = config ? 5 : 3;
+ } else if ((len == 3 && strncasecmp(str,"yes",3)==0)) {
+ autof = 2;
} else if ((len == 3 && strncasecmp(str,"mdp",3)==0)) {
autof = config ? 6 : 4;
} else if ((len == 1 && strncasecmp(str,"p",1)==0) ||