diff options
author | bde <bde@FreeBSD.org> | 1997-10-27 15:39:01 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-10-27 15:39:01 +0000 |
commit | 2fa5d417450237384dfedc29570816a4a0d0690f (patch) | |
tree | 86d8d73b0ab06fb3848d7744fd2b848b4f7c0054 /sys | |
parent | ebc42ddbe36d24622548b11008fe081f447de31a (diff) | |
download | FreeBSD-src-2fa5d417450237384dfedc29570816a4a0d0690f.zip FreeBSD-src-2fa5d417450237384dfedc29570816a4a0d0690f.tar.gz |
KNFize rev.1.31.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 10 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 7a04d99..ef82b11 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/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); diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 7a04d99..ef82b11 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); |