diff options
author | Neil Brown <neilb@suse.de> | 2004-01-22 03:10:29 +0100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2004-01-22 03:10:29 +0100 |
commit | 98c6faba80e6db0693f99faf5c6525ef4f1fb680 (patch) | |
tree | 73c58aeb3bd022665431cc513ce2bfd6f1560cd4 /Detail.c | |
parent | mdadm-1.4.0 (diff) | |
download | mdadm-98c6faba80e6db0693f99faf5c6525ef4f1fb680.tar.xz mdadm-98c6faba80e6db0693f99faf5c6525ef4f1fb680.zip |
mdadm-1.5.0mdadm-1.5.0
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -142,6 +142,17 @@ int Detail(char *dev, int brief, int test) } printf("\n"); + { + struct mdstat_ent *ms = mdstat_read(); + struct mdstat_ent *e; + for (e=ms; e; e=e->next) + if (e->devnum == array.md_minor) { + if (e->percent >= 0) + printf(" Rebuild Status : %d%% complete\n\n", e->percent); + break; + } + free_mdstat(ms); + } printf(" Number Major Minor RaidDevice State\n"); } for (d= 0; d<MD_SB_DISKS; d++) { @@ -189,8 +200,8 @@ int Detail(char *dev, int brief, int test) int fd = open(dv, O_RDONLY); if (fd >=0 && load_super(fd, &super) ==0 && - super.ctime == array.ctime && - super.level == array.level) + (unsigned long)super.ctime == (unsigned long)array.ctime && + (unsigned int)super.level == (unsigned int)array.level) have_super = 1; } } |