]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Allow --auto to still be meaningful when --scan is given
authorNeil Brown <neilb@suse.de>
Tue, 14 Jun 2005 06:33:02 +0000 (06:33 +0000)
committerNeil Brown <neilb@suse.de>
Tue, 14 Jun 2005 06:33:02 +0000 (06:33 +0000)
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
ChangeLog
config.c
mdadm.8
mdadm.c

index ba7f91b2806d85a90b69694e7a703edb3ef0a34b..8fdb46fe099422f9408e53b2d2e6e134b69c97b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@ Changes Prior to this release
        so that stack devices are stopped properly
     -   Minor type rationalisation for ident->uuid - now always 'int[]'
     -   Fix type in online help for --grow (was -F, now -G)
+    -   Allow --auto command line option to set default auto=
+       value when running "--assemble --scan".  Previously
+       --auto was ignored if --scan was given
        
 Changes Prior to 1.11.0 release
     -   Fix embarassing bug which causes --add to always fail.
index 20f972eec56a98a182c52eccca411f543c55b67c..08a8ed1aae71a650830615197f240eeb4836b3b6 100644 (file)
--- a/config.c
+++ b/config.c
@@ -345,7 +345,7 @@ void arrayline(char *line)
                        else if (strcasecmp(w+5,"yes")==0 || strcasecmp(w+5,"md")==0)
                                mis.autof = -1;
                        else {
-                               /* There might be digits, and maybe a hypen, at the end */
+                               /* There might be digits, and maybe a hyphen, at the end */
                                char *e = w+5 + strlen(w+5);
                                int num = 4;
                                int len;
diff --git a/mdadm.8 b/mdadm.8
index ab9dc91bf0b4aaf217dafe9d93385d6c272903f0..dfbb74c180457ba3b1634458a32cb454f30ea9ec 100644 (file)
--- a/mdadm.8
+++ b/mdadm.8
@@ -435,6 +435,14 @@ from this.  See DEVICE NAMES below.
 The argumentment can also come immediately after
 "-a".  e.g. "-ap".
 
+If
+.I --scan
+is also given, then any
+.I auto=
+entries in the config file will over-ride the
+.I --auto
+instruction given on the command line.
+
 For partitionable arrays,
 .I mdadm
 will create the device file for the whole array and for the first 4
diff --git a/mdadm.c b/mdadm.c
index 6d0548ecaf0bc93240883401ac1c69ea0a15ca94..54c011e88e5d93dc74482a71a780bd2e998e10db 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -821,7 +821,8 @@ int main(int argc, char *argv[])
                                        devlist->devname);
                                rv |= 1;
                        } else {
-                               mdfd = open_mddev(devlist->devname, array_ident->autof);
+                               mdfd = open_mddev(devlist->devname, 
+                                                 array_ident->autof ? array_ident->autof : autof);
                                if (mdfd < 0)
                                        rv |= 1;
                                else {
@@ -848,7 +849,8 @@ int main(int argc, char *argv[])
                                        rv |= 1;
                                        continue;
                                }
-                               mdfd = open_mddev(dv->devname, array_ident->autof);
+                               mdfd = open_mddev(dv->devname, 
+                                                 array_ident->autof ?array_ident->autof : autof);
                                if (mdfd < 0) {
                                        rv |= 1;
                                        continue;
@@ -866,7 +868,8 @@ int main(int argc, char *argv[])
                        } else
                                for (; array_list; array_list = array_list->next) {
                                        mdu_array_info_t array;
-                                       mdfd = open_mddev(array_list->devname, array_list->autof);
+                                       mdfd = open_mddev(array_list->devname, 
+                                                         array_list->autof ? array_list->autof : autof);
                                        if (mdfd < 0) {
                                                rv |= 1;
                                                continue;