diff options
author | Neil Brown <neilb@suse.de> | 2006-01-30 00:13:26 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-01-30 00:13:26 +0000 |
commit | 3d4064cc9bfa49f9aa933eb4d8164fe437ecda04 (patch) | |
tree | 7673159d5abce41c58b80b9e98678bdf22e8750e /Detail.c | |
parent | b674b5b86926a346b9692884f3aa3eb66f669c69 (diff) | |
download | mdadm-3d4064cc9bfa49f9aa933eb4d8164fe437ecda04.tar.gz mdadm-3d4064cc9bfa49f9aa933eb4d8164fe437ecda04.tar.xz mdadm-3d4064cc9bfa49f9aa933eb4d8164fe437ecda04.zip |
Support --help --assemble etc.
i.e. allow '--help' to be first and still give
context sensitive help.
Also don't print truncated device-size of very large arrays.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -163,8 +163,13 @@ int Detail(char *dev, int brief, int test) printf(" Raid Level : %s\n", c?c:"-unknown-"); if (larray_size) printf(" Array Size : %llu%s\n", (larray_size>>10), human_size(larray_size)); - if (array.level >= 1) - printf(" Device Size : %d%s\n", array.size, human_size((long long)array.size<<10)); + if (array.level >= 1) { + if (array.major_version != 0 && + larray_size >= 0xFFFFFFFFULL) + 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); printf(" Total Devices : %d\n", array.nr_disks); printf("Preferred Minor : %d\n", array.md_minor); |