diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index f376e3fd66fd..d4ed36ee37c1 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -240,22 +240,17 @@ ufs_mknod(ap) */ /* ARGSUSED */ static int -ufs_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufs_open(struct vop_open_args *ap) { + struct vnode *vp = ap->a_vp; - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (vp->v_type == VCHR || vp->v_type == VBLK) return (EOPNOTSUPP); /* * Files marked append-only must be opened for appending. */ - if ((VTOI(ap->a_vp)->i_flags & APPEND) && + if ((VTOI(vp)->i_flags & APPEND) && (ap->a_mode & (FWRITE | O_APPEND)) == FWRITE) return (EPERM); return (0);