From 2caecceeb5f2099e400de3515a0e28ee619c9b0f Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 16 Dec 1998 16:06:29 +0000 Subject: [PATCH] Removed all traces of SYSCTL_INTPTR(). Pointers can't really be passed across the kernel -> application interface, and for the one sysctl where they were passed and actually used (kern.ps_strings), the applications want addresses represented as u_longs anyway (the other sysctl that passed them, kern.usrstack, has never been used). Agreed to by: dfr, phk --- sys/kern/kern_exec.c | 9 ++++----- sys/sys/sysctl.h | 7 +------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 4200adf84b6..84d4d46fe38 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.87 1998/10/16 03:55:00 peter Exp $ + * $Id: kern_exec.c,v 1.88 1998/10/28 13:36:58 dg Exp $ */ #include @@ -66,11 +66,10 @@ static long *exec_copyout_strings __P((struct image_params *)); -static struct ps_strings *ps_strings = PS_STRINGS; -SYSCTL_INTPTR(_kern, KERN_PS_STRINGS, ps_strings, 0, &ps_strings, 0, ""); +SYSCTL_LONG(_kern, KERN_PS_STRINGS, ps_strings, CTLFLAG_RD, 0, + (u_long)PS_STRINGS, ""); +SYSCTL_LONG(_kern, KERN_USRSTACK, usrstack, CTLFLAG_RD, 0, USRSTACK, ""); -static caddr_t usrstack = (caddr_t)USRSTACK; -SYSCTL_INTPTR(_kern, KERN_USRSTACK, usrstack, 0, &usrstack, 0, ""); /* * Each of the items is a pointer to a `const struct execsw', hence the * double pointer here. diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 71d78c028cf..8e9704bdea5 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 - * $Id: sysctl.h,v 1.65 1998/09/05 17:13:28 bde Exp $ + * $Id: sysctl.h,v 1.66 1998/12/13 07:19:13 truckman Exp $ */ #ifndef _SYS_SYSCTL_H_ @@ -161,11 +161,6 @@ int sysctl_handle_opaque SYSCTL_HANDLER_ARGS; SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \ ptr, val, sysctl_handle_long, "L", descr) -/* Oid for an intptr_t. If ptr is NULL, val is returned. */ -#define SYSCTL_INTPTR(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \ - ptr, val, sysctl_handle_intptr, "P", descr) - /* Oid for an opaque object. Specified by a pointer and a length. */ #define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|access, \