summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-03 06:39:02 +1100
committerNeilBrown <neilb@suse.de>2008-11-03 06:39:02 +1100
commit350ac35d1f427c858e4b3169aaffcbaba0db3e30 (patch)
tree20c12c52099b85cba6a67790bd06bd9eeea0b264 /Incremental.c
parent4ebd3237119b1c1d701ea0c94795631883e449ed (diff)
downloadmdadm-350ac35d1f427c858e4b3169aaffcbaba0db3e30.tar.gz
mdadm-350ac35d1f427c858e4b3169aaffcbaba0db3e30.tar.xz
mdadm-350ac35d1f427c858e4b3169aaffcbaba0db3e30.zip
Incremental: change precedence order for autof setting.
It doesn't really make sense for the --auto setting to ever over-ride the setting on an ARRAY line. That could cause failure if the ARRAY line has a 'standard' now. So revert to the array line having precedence over command line, then CREATE line last. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Incremental.c b/Incremental.c
index 7148a73..1d326fd 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -40,7 +40,7 @@ int Incremental(char *devname, int verbose, int runstop,
struct supertype *st, char *homehost, int autof)
{
/* Add this device to an array, creating the array if necessary
- * and starting the array if sensibe or - if runstop>0 - if possible.
+ * and starting the array if sensible or - if runstop>0 - if possible.
*
* This has several steps:
*
@@ -225,9 +225,10 @@ int Incremental(char *devname, int verbose, int runstop,
/* There are three possible sources for 'autof': command line,
* ARRAY line in mdadm.conf, or CREATE line in mdadm.conf.
- * They have precedence in that order.
+ * ARRAY takes precedence, then command line, then
+ * CREATE.
*/
- if (autof == 0 && match)
+ if (match && match->autof)
autof = match->autof;
if (autof == 0)
autof = ci->autof;