summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-10 18:14:43 +1100
committerNeilBrown <neilb@suse.de>2011-03-10 18:14:43 +1100
commit18cb44962d1128ac5fc8f6922c591c0666b6de98 (patch)
treea4c4538f2f9fe4817d8e526b46d99308cf981991
parentd6508f0cfb60edf07b36f1532eae4d9cddf7178b (diff)
downloadmdadm-18cb44962d1128ac5fc8f6922c591c0666b6de98.tar.gz
ddf: Failed should suppress Online and others.
so the notes say, so make it so. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super-ddf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 35515c4..5f7a193 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1158,6 +1158,9 @@ static void examine_pds(struct ddf_super *sb)
(type&8) ? "spare" : "",
(type&16)? ", foreign" : "",
(type&32)? "pass-through" : "");
+ if (state & DDF_Failed)
+ /* This over-rides these three */
+ state &= ~(DDF_Online|DDF_Rebuilding|DDF_Transition);
printf("/%s%s%s%s%s%s%s",
(state&1)? "Online": "Offline",
(state&2)? ", Failed": "",