diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/isa/fd.c | 7 | ||||
-rw-r--r-- | sys/dev/isa/fd.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/arch/i386/isa/fd.c b/sys/arch/i386/isa/fd.c index 065e19ccfe9..4d2a8d9fe9a 100644 --- a/sys/arch/i386/isa/fd.c +++ b/sys/arch/i386/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); } 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); } |