diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 2001-04-09 07:14:24 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 2001-04-09 07:14:24 +0000 |
commit | 9b1fe5fc1ac937b51295538f4b165a1d9fc9ac95 (patch) | |
tree | c6461a4d96f7af1694080600ef5db641bf8ac344 /sys/miscfs/procfs/procfs_subr.c | |
parent | 6f2fdb9ba0804df4f105421d41cd208c8b2f1807 (diff) |
Add emulation of Linux features to procfs; mostly from NetBSD. ok deraadt@
Diffstat (limited to 'sys/miscfs/procfs/procfs_subr.c')
-rw-r--r-- | sys/miscfs/procfs/procfs_subr.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index 2c98efb0a8b..70fac2de646 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.12 2000/08/12 04:29:24 jasoni Exp $ */ +/* $OpenBSD: procfs_subr.c,v 1.13 2001/04/09 07:14:23 tholo Exp $ */ /* $NetBSD: procfs_subr.c,v 1.15 1996/02/12 15:01:42 christos Exp $ */ /* @@ -147,6 +147,7 @@ loop: break; case Pcurproc: /* /proc/curproc = lr--r--r-- */ + case Pself: /* /proc/self = lr--r--r-- */ pfs->pfs_mode = S_IRUSR|S_IRGRP|S_IROTH; vp->v_type = VLNK; break; @@ -172,7 +173,9 @@ loop: break; case Pstatus: /* /proc/N/status = -r--r--r-- */ - case Pcmdline: + case Pcmdline: /* /proc/N/cmdline = -r--r--r-- */ + case Pmeminfo: /* /proc/meminfo = -r--r--r-- */ + case Pcpuinfo: /* /proc/cpuinfo = -r--r--r-- */ pfs->pfs_mode = S_IRUSR|S_IRGRP|S_IROTH; vp->v_type = VREG; break; @@ -248,6 +251,12 @@ procfs_rw(v) case Pcmdline: return (procfs_docmdline(curp, p, pfs, uio)); + case Pmeminfo: + return (procfs_domeminfo(curp, p, pfs, uio)); + + case Pcpuinfo: + return (procfs_docpuinfo(curp, p, pfs, uio)); + default: return (EOPNOTSUPP); } |