diff options
author | kato <kato@FreeBSD.org> | 1997-08-29 09:03:40 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-08-29 09:03:40 +0000 |
commit | e896c0bacb1523256fb747b78af028a418f6fcce (patch) | |
tree | ebe8a89774e10987bf72d5bd0dae730f2129dd04 /sys/kern/kern_mib.c | |
parent | 4593c74e11ce58a5b06b5bb2c5928abd5036fb93 (diff) | |
download | FreeBSD-src-e896c0bacb1523256fb747b78af028a418f6fcce.zip FreeBSD-src-e896c0bacb1523256fb747b78af028a418f6fcce.tar.gz |
Added a sysctl arg, hw.machine_arch. The hw.machine_arch is "ibm-pc"
on IBM-PC box and is "pc-98" on NEC PC-98 box. Userland program can
distinguish architecture on which the program runs.
Diffstat (limited to 'sys/kern/kern_mib.c')
-rw-r--r-- | sys/kern/kern_mib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 42e2652..cf9d403 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_mib.c,v 1.8 1997/03/04 18:31:54 bde Exp $ + * $Id: kern_mib.c,v 1.9 1997/06/25 07:31:47 joerg Exp $ */ #include <sys/param.h> @@ -107,6 +107,10 @@ SYSCTL_INT(_hw, HW_BYTEORDER, byteorder, CTLFLAG_RD, 0, BYTE_ORDER, ""); SYSCTL_INT(_hw, HW_PAGESIZE, pagesize, CTLFLAG_RD, 0, PAGE_SIZE, ""); +static char machine_arch[] = MACHINE_ARCH; +SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, + machine_arch, 0, ""); + char hostname[MAXHOSTNAMELEN]; SYSCTL_STRING(_kern, KERN_HOSTNAME, hostname, CTLFLAG_RW, |