]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - config.c
Default to --auto=yes
[thirdparty/mdadm.git] / config.c
index 219308dc703740f715cba595c285ba1464ed480a..7101c3b0f14a4b29e112310e05b21cada9689978 100644 (file)
--- a/config.c
+++ b/config.c
@@ -255,6 +255,7 @@ mddev_dev_t load_partitions(void)
 }
 
 struct createinfo createinfo = {
+       .autof = 2, /* by default, create devices with standard names */
        .symlinks = 1,
 #ifdef DEBIAN
        .gid = 6, /* disk */
@@ -291,6 +292,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) ||
@@ -462,7 +465,7 @@ void arrayline(char *line)
                                fprintf(stderr, Name ": only specify bitmap file once. %s ignored\n",
                                        w);
                        else
-                               mis.bitmap_file = w+7;
+                               mis.bitmap_file = strdup(w+7);
 
                } else if (strncasecmp(w, "devices=", 8 ) == 0 ) {
                        if (mis.devices)