summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-09 11:40:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-09 11:40:59 +0000
commitad73653d36c9bd59872479e3c41f8942c70945b9 (patch)
treef184315b3ad68109e86aa4bd5bba3de919bfa3e3 /Detail.c
parentAdding upstream version 4.3+20240723. (diff)
downloadmdadm-ad73653d36c9bd59872479e3c41f8942c70945b9.tar.xz
mdadm-ad73653d36c9bd59872479e3c41f8942c70945b9.zip
Adding upstream version 4.3+20241108.upstream/4.3+20241108upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/Detail.c b/Detail.c
index f8b9e84..5819ced 100644
--- a/Detail.c
+++ b/Detail.c
@@ -25,6 +25,8 @@
#include "mdadm.h"
#include "md_p.h"
#include "md_u.h"
+#include "xmalloc.h"
+
#include <ctype.h>
#include <dirent.h>
@@ -549,16 +551,10 @@ int Detail(char *dev, struct context *c)
} else if (inactive && !is_container) {
printf(" State : inactive\n");
}
- if (array.raid_disks)
- printf(" Active Devices : %d\n", array.active_disks);
- if (array.working_disks > 0)
- printf(" Working Devices : %d\n",
- array.working_disks);
- if (array.raid_disks) {
- printf(" Failed Devices : %d\n", array.failed_disks);
- if (!external)
- printf(" Spare Devices : %d\n", array.spare_disks);
- }
+ printf(" Active Devices : %d\n", array.active_disks);
+ printf(" Working Devices : %d\n", array.working_disks);
+ printf(" Failed Devices : %d\n", array.failed_disks);
+ printf(" Spare Devices : %d\n", array.spare_disks);
printf("\n");
if (array.level == 5) {
str = map_num(r5layout, array.layout);