summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Detail.c b/Detail.c
index 704fffe..2986a6e 100644
--- a/Detail.c
+++ b/Detail.c
@@ -166,9 +166,13 @@ int Detail(char *dev, int brief, int test)
printf(" Array Size : %llu%s\n", (larray_size>>10), human_size(larray_size));
if (array.level >= 1) {
if (array.major_version != 0 &&
- larray_size >= 0xFFFFFFFFULL)
- printf(" Device Size : unknown\n");
- else
+ (larray_size >= 0xFFFFFFFFULL|| array.size == 0)) {
+ unsigned long long dsize = get_component_size(fd);
+ if (dsize > 0)
+ printf(" Device Size : %llu%s\n", dsize, human_size((long long)array.size<<10));
+ else
+ printf(" Device Size : unknown\n");
+ } else
printf(" Device Size : %d%s\n", array.size, human_size((long long)array.size<<10));
}
printf(" Raid Devices : %d\n", array.raid_disks);