add hw.alignbytes sysctl mib. this gives you the value of ALIGNBYTES
at the kernel compilation time (ALIGNBYTES that the kernel uses).
This commit is contained in:
parent
b22af17c02
commit
959ca07b4b
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sysctl.3,v 1.51 2000/02/26 08:48:21 itojun Exp $
|
||||
.\" $NetBSD: sysctl.3,v 1.52 2000/02/27 06:13:35 itojun Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -213,9 +213,10 @@ privilege may change the value.
|
||||
.It HW\_PHYSMEM integer no
|
||||
.It HW\_USERMEM integer no
|
||||
.It HW\_PAGESIZE integer no
|
||||
.\".It HW\_DISKNAMES struct no
|
||||
.\".It HW\_DISKSTATS struct no
|
||||
.It HW\_MACHINE\_ARCH string no
|
||||
.\".It HW\_DISKNAMES integer no
|
||||
.\".It HW\_DISKSTATS integer no
|
||||
.It HW\_ALIGNBYTES integer no
|
||||
.El
|
||||
.Pp
|
||||
.Bl -tag -width "123456"
|
||||
@ -234,10 +235,17 @@ The bytes of physical memory.
|
||||
The bytes of non-kernel memory.
|
||||
.It Li HW_PAGESIZE
|
||||
The software page size.
|
||||
.It Li HW_MACHINE_ARCH
|
||||
The machine cpu class.
|
||||
.\".It Fa HW_DISKNAMES
|
||||
.\".It Fa HW_DISKSTATS
|
||||
.It Li HW_MACHINE_ARCH
|
||||
The machine cpu class.
|
||||
.It Li HW_ALIGNBYTES
|
||||
Alignment constraint for all possible data types.
|
||||
This shows the value
|
||||
.Dv ALIGNBYTES
|
||||
in
|
||||
.Pa /usr/include/machine/param.h ,
|
||||
at the kernel compilation time.
|
||||
.El
|
||||
.Sh CTL_KERN
|
||||
The string and integer information available for the CTL_KERN level
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sysctl.8,v 1.43 2000/02/26 08:48:22 itojun Exp $
|
||||
.\" $NetBSD: sysctl.8,v 1.44 2000/02/27 06:13:37 itojun Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -116,7 +116,10 @@ privilege can change the value.
|
||||
.It ddb.onpanic integer yes
|
||||
.It ddb.radix integer yes
|
||||
.It ddb.tabstops integer yes
|
||||
.It hw.alignbytes integer no
|
||||
.It hw.byteorder integer no
|
||||
.\".It hw.disknames struct no
|
||||
.\".It hw.diskstats struct no
|
||||
.It hw.machine string no
|
||||
.It hw.machine_arch string no
|
||||
.It hw.model string no
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_sysctl.c,v 1.57 2000/02/06 07:29:58 fair Exp $ */
|
||||
/* $NetBSD: kern_sysctl.c,v 1.58 2000/02/27 06:13:40 itojun Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -468,6 +468,8 @@ hw_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
ctob(physmem - uvmexp.wired)));
|
||||
case HW_PAGESIZE:
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, PAGE_SIZE));
|
||||
case HW_ALIGNBYTES:
|
||||
return (sysctl_rdint(oldp, oldlenp, newp, ALIGNBYTES));
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sysctl.h,v 1.40 2000/02/06 07:29:59 fair Exp $ */
|
||||
/* $NetBSD: sysctl.h,v 1.41 2000/02/27 06:13:40 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -266,7 +266,8 @@ struct kinfo_proc {
|
||||
#define HW_DISKNAMES 8 /* strings: disk drive names */
|
||||
#define HW_DISKSTATS 9 /* struct: diskstats[] */
|
||||
#define HW_MACHINE_ARCH 10 /* string: machine architecture */
|
||||
#define HW_MAXID 11 /* number of valid hw ids */
|
||||
#define HW_ALIGNBYTES 11 /* int: ALIGNBYTES for the kernel */
|
||||
#define HW_MAXID 12 /* number of valid hw ids */
|
||||
|
||||
#define CTL_HW_NAMES { \
|
||||
{ 0, 0 }, \
|
||||
@ -280,6 +281,7 @@ struct kinfo_proc {
|
||||
{ "disknames", CTLTYPE_STRUCT }, \
|
||||
{ "diskstats", CTLTYPE_STRUCT }, \
|
||||
{ "machine_arch", CTLTYPE_STRING }, \
|
||||
{ "alignbytes", CTLTYPE_INT }, \
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user