summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-12-27 18:03:29 +0000
committerdfr <dfr@FreeBSD.org>1998-12-27 18:03:29 +0000
commit9238b8271dba66bff7d748e765d7930407e62c0e (patch)
tree9ea9431f80a2fb0797ec7a3226df618d63334d8b /sys/kern/kern_exec.c
parentab302cd2cde3a14092cba2812798a98860e1e41b (diff)
downloadFreeBSD-src-9238b8271dba66bff7d748e765d7930407e62c0e.zip
FreeBSD-src-9238b8271dba66bff7d748e765d7930407e62c0e.tar.gz
Fix some 64bit truncation problems which crept into SYSCTL_LONG() with the
last cleanup. Since the oid_arg2 field of struct sysctl_oid is not wide enough to hold a long, the SYSCTL_LONG() macro has been modified to only support exporting long variables by pointer instead of by value. Reviewed by: bde
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index e3a3b71..93e7bbd 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.89 1998/12/16 16:06:27 bde Exp $
+ * $Id: kern_exec.c,v 1.90 1998/12/16 16:28:57 bde Exp $
*/
#include <sys/param.h>
@@ -66,8 +66,11 @@
static long *exec_copyout_strings __P((struct image_params *));
-SYSCTL_LONG(_kern, KERN_PS_STRINGS, ps_strings, CTLFLAG_RD, 0, PS_STRINGS, "");
-SYSCTL_LONG(_kern, KERN_USRSTACK, usrstack, CTLFLAG_RD, 0, USRSTACK, "");
+static long ps_strings = PS_STRINGS;
+SYSCTL_LONG(_kern, KERN_PS_STRINGS, ps_strings, CTLFLAG_RD, &ps_strings, "");
+
+static long usrstack = USRSTACK;
+SYSCTL_LONG(_kern, KERN_USRSTACK, usrstack, CTLFLAG_RD, &usrstack, "");
/*
* Each of the items is a pointer to a `const struct execsw', hence the
OpenPOWER on IntegriCloud