From: Neil Brown Date: Thu, 12 Oct 2006 22:23:16 +0000 (+1000) Subject: Allow a number after --auto=yes X-Git-Tag: mdadm-2.5.4~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ba83b5f5e8946d49877229752e76a14b7672f69;p=thirdparty%2Fmdadm.git 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 --- diff --git a/ChangeLog b/ChangeLog index ea4a3e04..950ec68d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ Changes Prior to this release - Fix some endian-ness issues with version-1 superblocks (affects bigendian only). - Fix endian problem with 'bitmap' metadata + - Allow a number (of partitions) after the 'yes' option to --auto= + This is particularly useful in the 'create' line in mdadm.conf. Changes Prior to 2.5.3 release - Document v0.91 superblocks in md.4 diff --git a/config.c b/config.c index 219308dc..d251fbfb 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) ||