summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-11 19:08:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-11 19:08:25 +0000
commit6ffbaceec06b4b80fda2635877439f7a2b49a113 (patch)
tree87e91dde6a27b299a7a6199346fe9c1e67398739
parent724f1d496dce856f87ae3f54f4056207b2455a71 (diff)
b_resid cleanups, pointed out by minoura@kw.netlaputa.or.jp in netbsd pr#3007
-rw-r--r--sys/dev/atapi/acd.c3
-rw-r--r--sys/scsi/cd.c3
-rw-r--r--sys/scsi/sd.c3
-rw-r--r--sys/scsi/st.c6
4 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/atapi/acd.c b/sys/dev/atapi/acd.c
index 15113b3d50b..4e630eafdf8 100644
--- a/sys/dev/atapi/acd.c
+++ b/sys/dev/atapi/acd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acd.c,v 1.16 1996/12/05 13:12:11 deraadt Exp $ */
+/* $OpenBSD: acd.c,v 1.17 1996/12/11 19:08:24 deraadt Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -589,6 +589,7 @@ acdstart(vp)
if ((ad_link->flags & ADEV_MEDIA_LOADED) == 0) {
bp->b_error = EIO;
bp->b_flags |= B_ERROR;
+ bp->b_resid = bp->b_bcount;
biodone(bp);
continue;
}
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 7e84a1eeffc..82a995b0a93 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.17 1996/12/05 13:10:24 deraadt Exp $ */
+/* $OpenBSD: cd.c,v 1.18 1996/12/11 19:08:14 deraadt Exp $ */
/* $NetBSD: cd.c,v 1.92 1996/05/05 19:52:50 christos Exp $ */
/*
@@ -575,6 +575,7 @@ cdstart(v)
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
bp->b_error = EIO;
bp->b_flags |= B_ERROR;
+ bp->b_resid = bp->b_bcount;
biodone(bp);
continue;
}
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index b1b9515f6bc..65384ca7a96 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.20 1996/12/03 08:08:00 deraadt Exp $ */
+/* $OpenBSD: sd.c,v 1.21 1996/12/11 19:08:18 deraadt Exp $ */
/* $NetBSD: sd.c,v 1.100.4.1 1996/06/04 23:14:08 thorpej Exp $ */
/*
@@ -543,6 +543,7 @@ sdstart(v)
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
bp->b_error = EIO;
bp->b_flags |= B_ERROR;
+ bp->b_resid = bp->b_bcount;
biodone(bp);
continue;
}
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 97a4a811daf..0e2c16b6ea5 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.12 1996/08/11 23:26:07 deraadt Exp $ */
+/* $OpenBSD: st.c,v 1.13 1996/12/11 19:08:20 deraadt Exp $ */
/* $NetBSD: st.c,v 1.66 1996/05/05 19:53:01 christos Exp $ */
/*
@@ -936,7 +936,7 @@ ststart(v)
*bp->b_actb = dp;
/*
- * if the device has been unmounted byt the user
+ * if the device has been unmounted by the user
* then throw away all requests until done
*/
if (!(st->flags & ST_MOUNTED) ||
@@ -944,6 +944,7 @@ ststart(v)
/* make sure that one implies the other.. */
sc_link->flags &= ~SDEV_MEDIA_LOADED;
bp->b_flags |= B_ERROR;
+ bp->b_resid = bp->b_bcount;
bp->b_error = EIO;
biodone(bp);
continue;
@@ -966,6 +967,7 @@ ststart(v)
*/
if (st_space(st, 0, SP_FILEMARKS, 0)) {
bp->b_flags |= B_ERROR;
+ bp->b_resid = bp->b_bcount;
bp->b_error = EIO;
biodone(bp);
continue;