Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs set READres EOF flag correctly.



details:   https://anonhg.NetBSD.org/src/rev/c82910647147
branches:  trunk
changeset: 553700:c82910647147
user:      yamt <yamt%NetBSD.org@localhost>
date:      Mon Oct 20 13:53:47 2003 +0000

description:
set READres EOF flag correctly.

diffstat:

 sys/nfs/nfs_serv.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 297414afd3d5 -r c82910647147 sys/nfs/nfs_serv.c
--- a/sys/nfs/nfs_serv.c        Mon Oct 20 13:41:28 2003 +0000
+++ b/sys/nfs/nfs_serv.c        Mon Oct 20 13:53:47 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_serv.c,v 1.82 2003/10/15 11:29:01 hannken Exp $    */
+/*     $NetBSD: nfs_serv.c,v 1.83 2003/10/20 13:53:47 yamt Exp $       */
 
 /*
  * Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.82 2003/10/15 11:29:01 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.83 2003/10/20 13:53:47 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -802,7 +802,6 @@
                        uiop->uio_rw = UIO_READ;
                        uiop->uio_segflg = UIO_SYSSPACE;
                        error = VOP_READ(vp, uiop, IO_NODELOCKED, cred);
-                       off = uiop->uio_offset;
                        free((caddr_t)iv2, M_TEMP);
                }
 read_error:
@@ -825,8 +824,10 @@
        if (uiop->uio_resid || padlen)
                nfs_zeropad(mb, uiop->uio_resid, padlen);
        if (v3) {
+               /* count */
                *tl++ = txdr_unsigned(len);
-               if (len < reqlen)
+               /* eof */
+               if (off + len >= va.va_size)
                        *tl++ = nfs_true;
                else
                        *tl++ = nfs_false;



Home | Main Index | Thread Index | Old Index