summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-22 10:38:11 +1100
committerNeilBrown <neilb@suse.de>2012-10-22 10:38:11 +1100
commit71ec707658d88d3420a6dab9d527c0847c0241ed (patch)
tree1aeec7f5a1039b81ed4ad7d2b173dafad7294105 /Detail.c
parent4d3271732ec519691dd9a85dfdd7a7c9e3f52de9 (diff)
Detail: don't report a faulty device as 'spare' or 'rebuilding'.
If a device is faulty, then that is all there is too it. Even if it isn't 'removed' yet, it shouldn't be reported as 'spare' or 'rebuilding'. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Detail.c b/Detail.c
index 8ca3a962..3a2799d5 100644
--- a/Detail.c
+++ b/Detail.c
@@ -563,7 +563,8 @@ This is pretty boring
if (disk.state & (1<<MD_DISK_REMOVED)) printf(" removed");
if (disk.state & (1<<MD_DISK_WRITEMOSTLY)) printf(" writemostly");
if ((disk.state &
- ((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)|(1<<MD_DISK_REMOVED)))
+ ((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)
+ |(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY)))
== 0) {
printf(" spare");
if (is_26) {