diff options
author | Neil Brown <neilb@suse.de> | 2006-01-30 23:42:53 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-01-30 23:42:53 +0000 |
commit | 6ee5c05a11a7c5160178e6eb21a30d294f56f235 (patch) | |
tree | fcbb4ee05ed003438dc2f3175e0a4b21d6a4800a /Detail.c | |
parent | 8fac0577f01646cb8a768c0830a884f74c63a18c (diff) | |
download | mdadm-6ee5c05a11a7c5160178e6eb21a30d294f56f235.tar.gz |
Report device size correctly in --detail for Large devices.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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); |