diff options
author | Bruce Evans <bde@FreeBSD.org> | 1997-10-27 15:39:01 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1997-10-27 15:39:01 +0000 |
commit | 521166c5b2214603a7803fd5acbd428d13ae775a (patch) | |
tree | ab0702c32e7bb3147488523d9dd1d1e6c5686959 /sys/miscfs/procfs | |
parent | 72cd7335b0171ca348ae873b53c50463cbc4b031 (diff) | |
download | src-521166c5b2214603a7803fd5acbd428d13ae775a.tar.gz src-521166c5b2214603a7803fd5acbd428d13ae775a.zip |
KNFize rev.1.31.
Notes
Notes:
svn path=/head/; revision=30785
Diffstat (limited to 'sys/miscfs/procfs')
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 7a04d99e8900..ef82b1103aee 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.39 1997/10/26 20:55:22 phk Exp $ + * $Id: procfs_vnops.c,v 1.40 1997/10/27 13:33:41 bde Exp $ */ /* @@ -124,10 +124,11 @@ procfs_open(ap) } */ *ap; { struct pfsnode *pfs = VTOPFS(ap->a_vp); - struct proc *p1 = ap->a_p, *p2 = PFIND(pfs->pfs_pid); + struct proc *p1, *p2; + p2 = PFIND(pfs->pfs_pid); if (p2 == NULL) - return ENOENT; + return (ENOENT); switch (pfs->pfs_type) { case Pmem: @@ -135,9 +136,10 @@ procfs_open(ap) (pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE)) return (EBUSY); + p1 = ap->a_p; if (!CHECKIO(p1, p2) && (p1->p_cred->pc_ucred->cr_gid != KMEM_GROUP)) - return EPERM; + return (EPERM); if (ap->a_mode & FWRITE) pfs->pfs_flags = ap->a_mode & (FWRITE|O_EXCL); |