From a693baeb67b6f7b80d68286d4c53e7143ab87c41 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Tue, 18 Sep 2001 01:39:49 +0000 Subject: various cleanups from NetBSD --- sys/ufs/ext2fs/ext2fs_readwrite.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'sys/ufs/ext2fs/ext2fs_readwrite.c') diff --git a/sys/ufs/ext2fs/ext2fs_readwrite.c b/sys/ufs/ext2fs/ext2fs_readwrite.c index a77d20da2c2..9ae4322756f 100644 --- a/sys/ufs/ext2fs/ext2fs_readwrite.c +++ b/sys/ufs/ext2fs/ext2fs_readwrite.c @@ -1,5 +1,4 @@ -/* $OpenBSD: ext2fs_readwrite.c,v 1.8 2001/06/27 04:58:47 art Exp $ */ -/* $NetBSD: ext2fs_readwrite.c,v 1.1 1997/06/11 09:34:01 bouyer Exp $ */ +/* $NetBSD: ext2fs_readwrite.c,v 1.16 2001/02/27 04:37:47 chs Exp $ */ /*- * Copyright (c) 1997 Manuel Bouyer. @@ -52,8 +51,6 @@ #include #include -#include - #include #include #include @@ -77,20 +74,18 @@ ext2fs_read(v) int a_ioflag; struct ucred *a_cred; } */ *ap = v; - register struct vnode *vp; - register struct inode *ip; - register struct uio *uio; - register struct m_ext2fs *fs; + struct vnode *vp; + struct inode *ip; + struct uio *uio; + struct m_ext2fs *fs; struct buf *bp; - daddr_t lbn, nextlbn; + ufs_daddr_t lbn, nextlbn; off_t bytesinfile; long size, xfersize, blkoffset; int error; - u_short mode; vp = ap->a_vp; ip = VTOI(vp); - mode = ip->i_e2fs_mode; uio = ap->a_uio; #ifdef DIAGNOSTIC @@ -153,16 +148,17 @@ ext2fs_read(v) break; xfersize = size; } - error = uiomove((char *)bp->b_data + blkoffset, (int)xfersize, - uio); + error = uiomove((char *)bp->b_data + blkoffset, xfersize, uio); if (error) break; brelse(bp); } if (bp != NULL) brelse(bp); - if (!(vp->v_mount->mnt_flag & MNT_NOATIME)) + + if (!(vp->v_mount->mnt_flag & MNT_NOATIME)) { ip->i_flag |= IN_ACCESS; + } return (error); } @@ -179,13 +175,13 @@ ext2fs_write(v) int a_ioflag; struct ucred *a_cred; } */ *ap = v; - register struct vnode *vp; - register struct uio *uio; - register struct inode *ip; - register struct m_ext2fs *fs; + struct vnode *vp; + struct uio *uio; + struct inode *ip; + struct m_ext2fs *fs; struct buf *bp; struct proc *p; - daddr_t lbn; + ufs_daddr_t lbn; off_t osize; int blkoffset, error, flags, ioflag, resid, size, xfersize; -- cgit v1.2.3