diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 15:54:42 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 15:54:42 +0000 |
commit | 7e2a1c8f24e10b81fc3113260fb1404ee65c7685 (patch) | |
tree | 210b93f80324708c4e260672a82b6b27995bff01 /sys/dev/isa/fd.c | |
parent | 7de9eff104e6d6de39cdebb8065a679c44dbc532 (diff) |
correct b_resid handling; pointed out by banshee@gabriella.abattoir.com
Diffstat (limited to 'sys/dev/isa/fd.c')
-rw-r--r-- | sys/dev/isa/fd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 065e19ccfe9..4d2a8d9fe9a 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.18 1996/06/20 07:51:37 downsj Exp $ */ +/* $OpenBSD: fd.c,v 1.19 1996/08/07 15:54:41 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -528,11 +528,9 @@ fdstrategy(bp) if (bp->b_blkno + sz > fd->sc_type->size) { sz = fd->sc_type->size - bp->b_blkno; - if (sz == 0) { + if (sz == 0) /* If exactly at end of disk, return EOF. */ - bp->b_resid = bp->b_bcount; goto done; - } if (sz < 0) { /* If past end of disk, return EINVAL. */ bp->b_error = EINVAL; @@ -571,6 +569,7 @@ bad: bp->b_flags |= B_ERROR; done: /* Toss transfer; we're done early. */ + bp->b_resid = bp->b_bcount; biodone(bp); } |