Polish style.

This commit is contained in:
Poul-Henning Kamp 2005-01-24 12:19:28 +00:00
parent a515233f47
commit 091710ab22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140729

View File

@ -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);