aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-10-16 05:02:37 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-10-16 05:02:37 +0000
commit3b97fdf905eb70b7ac1afd3bc3d5bed82440f192 (patch)
tree880d4fa389944b5f19615bf51e867581e6aac4b5
parent379bb2d7797a04a1f2d7236120d983cbc5d9646d (diff)
downloadsrc-3b97fdf905eb70b7ac1afd3bc3d5bed82440f192.tar.gz
src-3b97fdf905eb70b7ac1afd3bc3d5bed82440f192.zip
Add semi-bogus initialization of dk_wpms so that systat and friends actually
do something useful with the disk stats. (This needs to be determined dynamically, but I don't want to screw with this driver.)
Notes
Notes: svn path=/head/; revision=3643
-rw-r--r--sys/i386/isa/wd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c
index 55665902f423..ed9faaa93e4c 100644
--- a/sys/i386/isa/wd.c
+++ b/sys/i386/isa/wd.c
@@ -401,6 +401,7 @@ wdattach(struct isa_device *dvp)
wd_registerdev(dvp->id_unit, lunit);
if(dk_ndrive < DK_NDRIVE) {
sprintf(dk_names[dk_ndrive], "wd%d", lunit);
+ dk_wpms[dk_ndrive] = 1048576; /* fake it */
du->dk_dkunit = dk_ndrive++;
} else {
du->dk_dkunit = -1;
@@ -595,8 +596,13 @@ loop:
secpertrk = lp->d_nsectors;
secpercyl = lp->d_secpercyl;
+ if(du->dk_dkunit >= 0) {
+ dk_wds[du->dk_dkunit] += bp->b_bcount >> 1;
+ }
+
if (du->dk_skip == 0) {
du->dk_bc = bp->b_bcount;
+
if (bp->b_flags & B_BAD
/*
* XXX handle large transfers inefficiently instead