diff options
author | dg <dg@FreeBSD.org> | 1994-08-08 13:53:55 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-08 13:53:55 +0000 |
commit | 90aed30c20ad6e31d1ee6762d2f2e262bd246e89 (patch) | |
tree | 14785effb485a0ece2109b154b3c2548894d1a21 /sys/kern/kern_physio.c | |
parent | f85fe1cefdfe8c691cdb767ab2def452c4f0530a (diff) | |
download | FreeBSD-src-90aed30c20ad6e31d1ee6762d2f2e262bd246e89.zip FreeBSD-src-90aed30c20ad6e31d1ee6762d2f2e262bd246e89.tar.gz |
Detect the "EOF" condition. Specifically, end of partition.
Submitted by: Bruce Evans
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r-- | sys/kern/kern_physio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 0fcb0bf..007d37f 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: kern_physio.c,v 1.4 1994/08/06 09:15:28 davidg Exp $ + * $Id: kern_physio.c,v 1.5 1994/08/07 13:10:31 davidg Exp $ */ #include <sys/param.h> @@ -120,6 +120,9 @@ physio(strategy, bp, dev, rw, minp, uio) */ { int iolen = bp->b_bcount - bp->b_resid; + + if (iolen == 0 && !(bp->b_flags & B_ERROR)) + goto doerror; /* EOF */ uio->uio_iov[i].iov_len -= iolen; uio->uio_iov[i].iov_base += iolen; uio->uio_resid -= iolen; |