diff options
Diffstat (limited to 'sys/miscfs/procfs')
-rw-r--r-- | sys/miscfs/procfs/procfs_subr.c | 5 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vfsops.c | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index b77489b..12dcf76 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -36,7 +36,7 @@ * * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95 * - * $Id: procfs_subr.c,v 1.17 1997/08/02 14:32:18 bde Exp $ + * $Id: procfs_subr.c,v 1.18 1997/12/06 04:11:12 sef Exp $ */ #include <sys/param.h> @@ -353,9 +353,10 @@ vfs_findname(nm, buf, buflen) } void -procfs_exit(pid_t pid) +procfs_exit(struct proc *p) { struct pfsnode *pfs; + pid_t pid = p->p_pid; for (pfs = pfshead; pfs ; pfs = pfs->pfs_next) { if (pfs->pfs_pid == pid) diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c index 3afd9e9..5983a56 100644 --- a/sys/miscfs/procfs/procfs_vfsops.c +++ b/sys/miscfs/procfs/procfs_vfsops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95 * - * $Id: procfs_vfsops.c,v 1.16 1997/08/02 14:32:19 bde Exp $ + * $Id: procfs_vfsops.c,v 1.17 1997/08/16 19:15:19 wollman Exp $ */ /* @@ -61,6 +61,8 @@ static int procfs_statfs __P((struct mount *mp, struct statfs *sbp, static int procfs_unmount __P((struct mount *mp, int mntflags, struct proc *p)); +extern void procfs_exit __P((struct proc *)); + /* * VFS Operations. * @@ -96,6 +98,7 @@ procfs_mount(mp, path, data, ndp, p) bcopy("procfs", mp->mnt_stat.f_mntfromname, size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); (void)procfs_statfs(mp, &mp->mnt_stat, p); + return (0); } @@ -172,6 +175,12 @@ static int procfs_init(vfsp) struct vfsconf *vfsp; { + int error; + /* + * XXX - this should be rm_at_exit'd in an LKM unload function, + */ + if (error = at_exit(procfs_exit)) + printf("procfs: cannot register procfs_exit with at_exit -- error %d\n", error); return (0); } |