summaryrefslogtreecommitdiff
path: root/sys/ufs/ext2fs
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-09-18 01:39:49 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-09-18 01:39:49 +0000
commita693baeb67b6f7b80d68286d4c53e7143ab87c41 (patch)
tree6476491c2c5c26da6f4d17547292df41c1ccb8c2 /sys/ufs/ext2fs
parent57589e59ec7bf78b9cdcda66c031f6220a525c19 (diff)
various cleanups from NetBSD
Diffstat (limited to 'sys/ufs/ext2fs')
-rw-r--r--sys/ufs/ext2fs/ext2fs_readwrite.c34
-rw-r--r--sys/ufs/ext2fs/ext2fs_subr.c8
2 files changed, 19 insertions, 23 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;
diff --git a/sys/ufs/ext2fs/ext2fs_subr.c b/sys/ufs/ext2fs/ext2fs_subr.c
index cdb95040224..82165b8f242 100644
--- a/sys/ufs/ext2fs/ext2fs_subr.c
+++ b/sys/ufs/ext2fs/ext2fs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_subr.c,v 1.5 2001/09/18 00:34:49 art Exp $ */
+/* $OpenBSD: ext2fs_subr.c,v 1.6 2001/09/18 01:39:13 art Exp $ */
/* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */
/*
@@ -60,7 +60,7 @@ ext2fs_bufatoff(struct inode *ip, off_t offset, char **res, struct buf **bpp)
struct vnode *vp;
struct m_ext2fs *fs;
struct buf *bp;
- daddr_t lbn;
+ ufs_daddr_t lbn;
int error;
vp = ITOV(ip);
@@ -85,8 +85,8 @@ ext2fs_checkoverlap(bp, ip)
struct buf *bp;
struct inode *ip;
{
- register struct buf *ebp, *ep;
- register daddr_t start, last;
+ struct buf *ebp, *ep;
+ ufs_daddr_t start, last;
struct vnode *vp;
ebp = &buf[nbuf];