summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1995-11-19 13:27:52 +0000
committerderaadt <deraadt@openbsd.org>1995-11-19 13:27:52 +0000
commitfc3d4f30c219073c07b92966ca93f718b61fd6ec (patch)
treead17b6ced0d258cd62aa6d2ff3882200fe08147f
parentlatest from ftp://rs.internic.net/domain/named.ca (diff)
downloadwireguard-openbsd-fc3d4f30c219073c07b92966ca93f718b61fd6ec.tar.xz
wireguard-openbsd-fc3d4f30c219073c07b92966ca93f718b61fd6ec.zip
if you read with a smaller buffer than the block on the tape, b_resid and b_count would be incorrect; from jtk@kolvir.arlington.ma.us; netbsd pr#1597
-rw-r--r--sys/scsi/st.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 3bc47126faa..b83092de870 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -854,7 +854,8 @@ done:
/*
* Correctly set the buf to indicate a completed xfer
*/
- iodone(bp);
+ bp->b_resid = bp->b_bcount;
+ biodone(bp);
return;
}
@@ -1611,7 +1612,7 @@ st_interpret_sense(xs)
struct buf *bp = xs->bp;
struct st_softc *st = sc_link->device_softc;
u_int8_t key;
- u_int32_t info;
+ int32_t info;
/*
* Get the sense fields and work out what code