Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/compat/netbsd32 Pull up revision 1.6 (requested by ...
details: https://anonhg.NetBSD.org/src/rev/5a7bb58e2949
branches: netbsd-1-6
changeset: 527918:5a7bb58e2949
user: lukem <lukem%NetBSD.org@localhost>
date: Sat Jun 15 01:05:49 2002 +0000
description:
Pull up revision 1.6 (requested by eeh in ticket #275):
Provide the correct architecture for HW_MACHINE_ARCH so things like
"sysctl -p" can tell they are in 32-bit land.
diffstat:
sys/compat/netbsd32/netbsd32_sysctl.c | 32 +++++++++++++++++++++++++++++---
1 files changed, 29 insertions(+), 3 deletions(-)
diffs (67 lines):
diff -r 6cc9f2e219de -r 5a7bb58e2949 sys/compat/netbsd32/netbsd32_sysctl.c
--- a/sys/compat/netbsd32/netbsd32_sysctl.c Sat Jun 15 01:05:40 2002 +0000
+++ b/sys/compat/netbsd32/netbsd32_sysctl.c Sat Jun 15 01:05:49 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_sysctl.c,v 1.5 2002/02/14 07:08:20 chs Exp $ */
+/* $NetBSD: netbsd32_sysctl.c,v 1.5.10.1 2002/06/15 01:05:49 lukem Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.5 2002/02/14 07:08:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.5.10.1 2002/06/15 01:05:49 lukem Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -61,6 +61,7 @@
int uvm_sysctl32(int *, u_int, void *, size_t *, void *, size_t, struct proc *);
int kern_sysctl32(int *, u_int, void *, size_t *, void *, size_t, struct proc *);
+int hw_sysctl32(int *, u_int, void *, size_t *, void *, size_t, struct proc *);
/*
* uvm_sysctl32: sysctl hook into UVM system, handling special 32-bit
@@ -139,6 +140,24 @@
/* NOTREACHED */
}
+/*
+ * hardware related system variables.
+ */
+int
+hw_sysctl32(int *name, u_int namelen, void *oldp, size_t *oldlenp,
+ void *newp, size_t newlen, struct proc *p)
+{
+ extern char machine_arch32[];
+
+ switch (name[0]) {
+ case HW_MACHINE_ARCH:
+ return (sysctl_rdstring(oldp, oldlenp, newp, machine_arch32));
+ default:
+ return (EOPNOTSUPP);
+ }
+ /* NOTREACHED */
+}
+
int
netbsd32___sysctl(p, v, retval)
struct proc *p;
@@ -195,7 +214,14 @@
}
break;
case CTL_HW:
- fn = hw_sysctl;
+ switch (name[1]) {
+ case HW_MACHINE_ARCH:
+ fn = hw_sysctl32;
+ break;
+ default:
+ fn = hw_sysctl;
+ break;
+ }
break;
case CTL_VM:
switch (name[1]) {
Home |
Main Index |
Thread Index |
Old Index