summaryrefslogtreecommitdiff
path: root/sys/gnu/fs/ext2fs
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2008-10-28 13:44:11 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2008-10-28 13:44:11 +0000
commit15bc6b2bd8d8c56ad74e57675dde8501bc7f53e1 (patch)
treecb5d9bbe34cd6eae2c3dd212bdfdfd85569424dd /sys/gnu/fs/ext2fs
parent9215889d21ffb366dda6fcbd62483657769367f2 (diff)
Notes
Diffstat (limited to 'sys/gnu/fs/ext2fs')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c8
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vnops.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 5e3c56c84cc7..0968e48bf3c0 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -137,7 +137,7 @@ ext2_mount(mp, td)
struct ext2_sb_info *fs;
char *path, *fspec;
int error, flags, len;
- mode_t accessmode;
+ accmode_t accmode;
struct nameidata nd, *ndp = &nd;
opts = mp->mnt_optnew;
@@ -265,10 +265,10 @@ ext2_mount(mp, td)
*
* XXXRW: VOP_ACCESS() enough?
*/
- accessmode = VREAD;
+ accmode = VREAD;
if ((mp->mnt_flag & MNT_RDONLY) == 0)
- accessmode |= VWRITE;
- error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
+ accmode |= VWRITE;
+ error = VOP_ACCESS(devvp, accmode, td->td_ucred, td);
if (error)
error = priv_check(td, PRIV_VFS_MOUNT_PERM);
if (error) {
diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c
index 6296c0e15781..f81d5097df1f 100644
--- a/sys/gnu/fs/ext2fs/ext2_vnops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vnops.c
@@ -283,14 +283,14 @@ static int
ext2_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
- int a_mode;
+ accmode_t a_accmode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
- mode_t mode = ap->a_mode;
+ accmode_t accmode = ap->a_accmode;
int error;
if (vp->v_type == VBLK || vp->v_type == VCHR)
@@ -301,7 +301,7 @@ ext2_access(ap)
* unless the file is a socket, fifo, or a block or
* character device resident on the file system.
*/
- if (mode & VWRITE) {
+ if (accmode & VWRITE) {
switch (vp->v_type) {
case VDIR:
case VLNK:
@@ -315,11 +315,11 @@ ext2_access(ap)
}
/* If immutable bit set, nobody gets to write it. */
- if ((mode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT)))
+ if ((accmode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT)))
return (EPERM);
error = vaccess(vp->v_type, ip->i_mode, ip->i_uid, ip->i_gid,
- ap->a_mode, ap->a_cred, NULL);
+ ap->a_accmode, ap->a_cred, NULL);
return (error);
}