ddf: Failed should suppress Online and others.

so the notes say, so make it so.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-03-10 18:14:43 +11:00
parent d6508f0cfb
commit 18cb44962d
1 changed files with 3 additions and 0 deletions

View File

@ -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": "",