summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-02-24 14:32:53 +0000
committerpeter <peter@FreeBSD.org>1996-02-24 14:32:53 +0000
commit427e11b898e376c5200a6077bb0cec0547ea6e28 (patch)
tree95dad9b27f9127e83a32836c512b915493b4cd94 /sys/kern
parent0fc9e4e31d67122e255fb7e1618483ed6e9836f3 (diff)
downloadFreeBSD-src-427e11b898e376c5200a6077bb0cec0547ea6e28.zip
FreeBSD-src-427e11b898e376c5200a6077bb0cec0547ea6e28.tar.gz
Add two sysctl variables that can be read by libutil and libkvm so that
they can adapt to simple kernel VM layout changes.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exec.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 1c4c4a4..9933183 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_exec.c,v 1.33 1996/01/19 03:58:01 dyson Exp $
+ * $Id: kern_exec.c,v 1.34 1996/01/20 21:36:30 bde Exp $
*/
#include <sys/param.h>
@@ -47,6 +47,7 @@
#include <sys/sysent.h>
#include <sys/syslog.h>
#include <sys/shm.h>
+#include <sys/sysctl.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -64,6 +65,16 @@ static int *exec_copyout_strings __P((struct image_params *));
static int exec_check_permissions(struct image_params *);
/*
+ * XXX trouble here if sizeof(caddr_t) != sizeof(int), other parts
+ * of the sysctl code also assumes this, and sizeof(int) == sizeof(long).
+ */
+static caddr_t ps_strings = (caddr_t)PS_STRINGS;
+SYSCTL_INT(_kern, KERN_PS_STRINGS, ps_strings, 0, &ps_strings, 0, "");
+
+static caddr_t usrstack = (caddr_t)USRSTACK;
+SYSCTL_INT(_kern, KERN_USRSTACK, usrstack, 0, &usrstack, 0, "");
+
+/*
* execsw_set is constructed for us by the linker. Each of the items
* is a pointer to a `const struct execsw', hence the double pointer here.
*/
OpenPOWER on IntegriCloud