diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-09-18 01:39:49 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-09-18 01:39:49 +0000 |
commit | a693baeb67b6f7b80d68286d4c53e7143ab87c41 (patch) | |
tree | 6476491c2c5c26da6f4d17547292df41c1ccb8c2 /sys/ufs/ext2fs/ext2fs_readwrite.c | |
parent | 57589e59ec7bf78b9cdcda66c031f6220a525c19 (diff) |
various cleanups from NetBSD
Diffstat (limited to 'sys/ufs/ext2fs/ext2fs_readwrite.c')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_readwrite.c | 34 |
1 files changed, 15 insertions, 19 deletions
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 <sys/malloc.h> #include <sys/signalvar.h> -#include <vm/vm.h> - #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ext2fs/ext2fs.h> @@ -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; |