summaryrefslogtreecommitdiff
path: root/sys/miscfs
diff options
context:
space:
mode:
authorThomas Nordin <nordin@cvs.openbsd.org>2002-01-30 20:29:45 +0000
committerThomas Nordin <nordin@cvs.openbsd.org>2002-01-30 20:29:45 +0000
commitc7b223fb77e2a96d9713a5ad6a7fdc51eefc3a18 (patch)
tree17a230b08704e1010e3bd9ba211c0cff3ca4a476 /sys/miscfs
parent5b119e8ad657049115a40336143bcd30b912b268 (diff)
Add proc0 to the PIDHASH table. art@ ok
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/procfs/procfs.h3
-rw-r--r--sys/miscfs/procfs/procfs_subr.c4
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c16
3 files changed, 11 insertions, 12 deletions
diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h
index a35112a4f12..619a7cc205b 100644
--- a/sys/miscfs/procfs/procfs.h
+++ b/sys/miscfs/procfs/procfs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs.h,v 1.13 2001/06/27 04:58:43 art Exp $ */
+/* $OpenBSD: procfs.h,v 1.14 2002/01/30 20:29:44 nordin Exp $ */
/* $NetBSD: procfs.h,v 1.17 1996/02/12 15:01:41 christos Exp $ */
/*
@@ -123,7 +123,6 @@ struct vfs_namemap {
int vfs_getuserstr __P((struct uio *, char *, int *));
vfs_namemap_t *vfs_findname __P((vfs_namemap_t *, char *, int));
-#define PFIND(pid) ((pid) ? pfind(pid) : &proc0)
int procfs_allocvp __P((struct mount *, struct vnode **, long, pfstype));
int procfs_checkioperm __P((struct proc *p, struct proc *t));
int procfs_doctl __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio));
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c
index db88505b070..9d0f1c9fb5a 100644
--- a/sys/miscfs/procfs/procfs_subr.c
+++ b/sys/miscfs/procfs/procfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_subr.c,v 1.15 2001/11/15 07:04:21 art Exp $ */
+/* $OpenBSD: procfs_subr.c,v 1.16 2002/01/30 20:29:44 nordin Exp $ */
/* $NetBSD: procfs_subr.c,v 1.15 1996/02/12 15:01:42 christos Exp $ */
/*
@@ -211,7 +211,7 @@ procfs_rw(v)
struct pfsnode *pfs = VTOPFS(vp);
struct proc *p;
- p = PFIND(pfs->pfs_pid);
+ p = pfind(pfs->pfs_pid);
if (p == 0)
return (EINVAL);
/* Do not permit games to be played with init(8) */
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index 29e162374b5..a680f1b273b 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vnops.c,v 1.21 2001/12/04 22:44:32 art Exp $ */
+/* $OpenBSD: procfs_vnops.c,v 1.22 2002/01/30 20:29:44 nordin Exp $ */
/* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */
/*
@@ -224,7 +224,7 @@ procfs_open(v)
struct proc *p2; /* traced */
int error;
- if ((p2 = PFIND(pfs->pfs_pid)) == 0)
+ if ((p2 = pfind(pfs->pfs_pid)) == 0)
return (ENOENT); /* was ESRCH, jsp */
switch (pfs->pfs_type) {
@@ -345,7 +345,7 @@ procfs_bmap(v)
* the vnode by calling vgone(). this may
* be overkill and a waste of time since the
* chances are that the process will still be
- * there and PFIND is not free.
+ * there and pfind is not free.
*
* (vp) is not locked on entry or exit.
*/
@@ -358,7 +358,7 @@ procfs_inactive(v)
} */ *ap = v;
struct pfsnode *pfs = VTOPFS(ap->a_vp);
- if (PFIND(pfs->pfs_pid) == 0)
+ if (pfind(pfs->pfs_pid) == 0)
vgone(ap->a_vp);
return (0);
@@ -519,7 +519,7 @@ procfs_getattr(v)
break;
default:
- procp = PFIND(pfs->pfs_pid);
+ procp = pfind(pfs->pfs_pid);
if (procp == 0)
return (ENOENT);
}
@@ -802,7 +802,7 @@ procfs_lookup(v)
if (pid == NO_PID)
break;
- p = PFIND(pid);
+ p = pfind(pid);
if (p == 0)
break;
@@ -812,7 +812,7 @@ procfs_lookup(v)
if (cnp->cn_flags & ISDOTDOT)
return (procfs_root(dvp->v_mount, vpp));
- p = PFIND(pfs->pfs_pid);
+ p = pfind(pfs->pfs_pid);
if (p == 0)
break;
@@ -920,7 +920,7 @@ procfs_readdir(v)
struct proc *p;
struct proc_target *pt;
- p = PFIND(pfs->pfs_pid);
+ p = pfind(pfs->pfs_pid);
if (p == NULL)
break;