diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-23 15:38:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-23 15:38:39 +0000 |
commit | 61c666c9333df533d3197a22ee2cc8d83ae0c298 (patch) | |
tree | 8ebb9e313d235cc991655f1effc7a035ddf7fab2 /sys/vm | |
parent | 28f64c37d06864b3cd81b57e0f80fe5e11694e71 (diff) |
sysctl to locate psstrings
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_meter.c | 7 | ||||
-rw-r--r-- | sys/vm/vm_param.h | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 100c65b88b8..217455c559b 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_meter.c,v 1.2 1996/03/03 17:45:32 niklas Exp $ */ +/* $OpenBSD: vm_meter.c,v 1.3 1996/10/23 15:38:36 deraadt Exp $ */ /* $NetBSD: vm_meter.c,v 1.18 1996/02/05 01:53:59 christos Exp $ */ /* @@ -42,6 +42,7 @@ #include <sys/kernel.h> #include <vm/vm.h> #include <sys/sysctl.h> +#include <sys/exec.h> struct loadavg averunnable; /* load average, of runnable procs */ @@ -111,6 +112,7 @@ vm_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) struct proc *p; { struct vmtotal vmtotals; + struct _ps_strings _ps = { PS_STRINGS }; /* all sysctl names at this level are terminal */ if (namelen != 1) @@ -125,6 +127,9 @@ vm_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) vmtotal(&vmtotals); return (sysctl_rdstruct(oldp, oldlenp, newp, &vmtotals, sizeof(vmtotals))); + case VM_PSSTRINGS: + return (sysctl_rdstruct(oldp, oldlenp, newp, &_ps, + sizeof _ps)); default: return (EOPNOTSUPP); } diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h index 236be42c40c..5c155ce4c18 100644 --- a/sys/vm/vm_param.h +++ b/sys/vm/vm_param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_param.h,v 1.6 1996/05/28 12:16:32 deraadt Exp $ */ +/* $OpenBSD: vm_param.h,v 1.7 1996/10/23 15:38:38 deraadt Exp $ */ /* $NetBSD: vm_param.h,v 1.12 1995/03/26 20:39:16 jtc Exp $ */ /* @@ -105,14 +105,20 @@ extern int page_shift; */ #define VM_METER 1 /* struct vmmeter */ #define VM_LOADAVG 2 /* struct loadavg */ -#define VM_MAXID 3 /* number of valid vm ids */ +#define VM_PSSTRINGS 3 /* PSSTRINGS */ +#define VM_MAXID 4 /* number of valid vm ids */ #define CTL_VM_NAMES { \ { 0, 0 }, \ { "vmmeter", CTLTYPE_STRUCT }, \ { "loadavg", CTLTYPE_STRUCT }, \ + { "psstrings", CTLTYPE_STRUCT }, \ } +struct _ps_strings { + void *val; +}; + /* * Return values from the VM routines. */ |