summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2004-01-22 03:10:29 +0100
committerNeil Brown <neilb@suse.de>2004-01-22 03:10:29 +0100
commit98c6faba80e6db0693f99faf5c6525ef4f1fb680 (patch)
tree73c58aeb3bd022665431cc513ce2bfd6f1560cd4 /Detail.c
parentmdadm-1.4.0 (diff)
downloadmdadm-98c6faba80e6db0693f99faf5c6525ef4f1fb680.tar.xz
mdadm-98c6faba80e6db0693f99faf5c6525ef4f1fb680.zip
mdadm-1.5.0mdadm-1.5.0
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/Detail.c b/Detail.c
index d508988a..419c45cb 100644
--- a/Detail.c
+++ b/Detail.c
@@ -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;
}
}