Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ufs make LFS work again.



details:   https://anonhg.NetBSD.org/src/rev/82c9c74e4bd4
branches:  trunk
changeset: 515093:82c9c74e4bd4
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Sep 16 13:57:56 2001 +0000

description:
make LFS work again.

diffstat:

 sys/ufs/ufs/ufs_readwrite.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r 9785bc82d924 -r 82c9c74e4bd4 sys/ufs/ufs/ufs_readwrite.c
--- a/sys/ufs/ufs/ufs_readwrite.c       Sun Sep 16 13:55:09 2001 +0000
+++ b/sys/ufs/ufs/ufs_readwrite.c       Sun Sep 16 13:57:56 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_readwrite.c,v 1.33 2001/09/15 20:36:44 chs Exp $   */
+/*     $NetBSD: ufs_readwrite.c,v 1.34 2001/09/16 13:57:56 chs Exp $   */
 
 /*-
  * Copyright (c) 1993
@@ -79,6 +79,7 @@
        off_t bytesinfile;
        long size, xfersize, blkoffset;
        int error;
+       boolean_t usepc = FALSE;
 
        vp = ap->a_vp;
        ip = VTOI(vp);
@@ -106,7 +107,10 @@
                goto out;
        }
 
-       if (vp->v_type == VREG) {
+#ifndef LFS_READWRITE
+       usepc = vp->v_type == VREG;
+#endif
+       if (usepc) {
                while (uio->uio_resid > 0) {
                        bytelen = MIN(ip->i_ffs_size - uio->uio_offset,
                            uio->uio_resid);
@@ -202,6 +206,7 @@
        void *win;
        vsize_t bytelen;
        boolean_t alloced;
+       boolean_t usepc = FALSE;
 
        cred = ap->a_cred;
        ioflag = ap->a_ioflag;
@@ -261,7 +266,10 @@
        bsize = fs->fs_bsize;
        error = 0;
 
-       if (vp->v_type != VREG) {
+#ifndef LFS_READWRITE
+       usepc = vp->v_type == VREG;
+#endif
+       if (!usepc) {
                goto bcache;
        }
 



Home | Main Index | Thread Index | Old Index