Polish style.
This commit is contained in:
parent
a515233f47
commit
091710ab22
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140729
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user