From 90aed30c20ad6e31d1ee6762d2f2e262bd246e89 Mon Sep 17 00:00:00 2001 From: dg Date: Mon, 8 Aug 1994 13:53:55 +0000 Subject: Detect the "EOF" condition. Specifically, end of partition. Submitted by: Bruce Evans --- sys/kern/kern_physio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_physio.c') 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 @@ -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; -- cgit v1.1