summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ips.c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2009-03-21 17:49:33 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2009-03-21 17:49:33 +0000
commit8049b60bee1c313e7a5625e7862c3ec61c717ba7 (patch)
treef3699eff37d76393546efe93a5fdc4bbf616e4fa /sys/dev/pci/ips.c
parent767fef2f1546516e98fda78cd7493e0327540714 (diff)
If rebuild is active set volume state to ``rebuild''.
Diffstat (limited to 'sys/dev/pci/ips.c')
-rw-r--r--sys/dev/pci/ips.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index d70a89b6aa9..c36baa888ff 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.87 2009/03/21 17:44:43 grange Exp $ */
+/* $OpenBSD: ips.c,v 1.88 2009/03/21 17:49:32 grange Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -1182,8 +1182,10 @@ ips_ioctl_vol(struct ips_softc *sc, struct bioc_vol *bv)
if (rebuild) {
total = letoh32(rblstat->ld[vid].total);
done = total - letoh32(rblstat->ld[vid].remain);
- if (total && total > done)
+ if (total && total > done) {
+ bv->bv_status = BIOC_SVREBUILD;
bv->bv_percent = 100 * done / total;
+ }
}
bv->bv_size = (u_quad_t)letoh32(ld->size) * IPS_SECSZ;