mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-05 02:23:47 +08:00
SYSCTL(9): Avoid multiple definitions
This commit is contained in:
parent
6da9b2397b
commit
a3d804ad75
@ -46,27 +46,17 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <rtems/bsd/sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#ifndef __rtems__
|
||||
#include <sys/sbuf.h>
|
||||
#endif
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/proc.h>
|
||||
#ifndef __rtems__
|
||||
#include <rtems/bsd/sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/jail.h>
|
||||
#include <sys/smp.h>
|
||||
#include <sys/sx.h>
|
||||
#endif
|
||||
#include <rtems/bsd/sys/unistd.h>
|
||||
|
||||
#ifdef __rtems__
|
||||
char machine[] = "SET ME";
|
||||
char osrelease[] = RTEMS_VERSION;
|
||||
char ostype[] = "RTEMS";
|
||||
#endif
|
||||
|
||||
SYSCTL_NODE(, 0, sysctl, CTLFLAG_RW, 0,
|
||||
"Sysctl internal magic");
|
||||
SYSCTL_NODE(, CTL_KERN, kern, CTLFLAG_RW, 0,
|
||||
@ -76,16 +66,18 @@ SYSCTL_NODE(, CTL_VM, vm, CTLFLAG_RW, 0,
|
||||
"Virtual memory");
|
||||
SYSCTL_NODE(, CTL_VFS, vfs, CTLFLAG_RW, 0,
|
||||
"File system");
|
||||
#endif
|
||||
#endif /* __rtems__ */
|
||||
SYSCTL_NODE(, CTL_NET, net, CTLFLAG_RW, 0,
|
||||
"Network, (see socket.h)");
|
||||
#ifndef __rtems__
|
||||
SYSCTL_NODE(, CTL_DEBUG, debug, CTLFLAG_RW, 0,
|
||||
"Debugging");
|
||||
#ifndef __rtems__
|
||||
SYSCTL_NODE(_debug, OID_AUTO, sizeof, CTLFLAG_RW, 0,
|
||||
"Sizeof various things");
|
||||
#endif /* __rtems__ */
|
||||
SYSCTL_NODE(, CTL_HW, hw, CTLFLAG_RW, 0,
|
||||
"hardware");
|
||||
#ifndef __rtems__
|
||||
SYSCTL_NODE(, CTL_MACHDEP, machdep, CTLFLAG_RW, 0,
|
||||
"machine dependent");
|
||||
SYSCTL_NODE(, CTL_USER, user, CTLFLAG_RW, 0,
|
||||
@ -106,7 +98,6 @@ SYSCTL_NODE(, OID_AUTO, regression, CTLFLAG_RW, 0,
|
||||
|
||||
SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD|CTLFLAG_MPSAFE,
|
||||
kern_ident, 0, "Kernel identifier");
|
||||
#endif /* __rtems__ */
|
||||
|
||||
SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD|CTLFLAG_MPSAFE,
|
||||
osrelease, 0, "Operating system release");
|
||||
@ -114,15 +105,12 @@ SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD|CTLFLAG_MPSAFE,
|
||||
SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD,
|
||||
0, BSD, "Operating system revision");
|
||||
|
||||
#ifndef __rtems__
|
||||
SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD|CTLFLAG_MPSAFE,
|
||||
version, 0, "Kernel version");
|
||||
#endif
|
||||
|
||||
SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD|CTLFLAG_MPSAFE,
|
||||
ostype, 0, "Operating system type");
|
||||
|
||||
#ifndef __rtems__
|
||||
/*
|
||||
* NOTICE: The *userland* release date is available in
|
||||
* /usr/include/osreldate.h
|
||||
@ -446,11 +434,11 @@ sysctl_hostid(SYSCTL_HANDLER_ARGS)
|
||||
SYSCTL_PROC(_kern, KERN_HOSTID, hostid,
|
||||
CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
|
||||
NULL, 0, sysctl_hostid, "LU", "Host ID");
|
||||
#endif /* __rtems__ */
|
||||
|
||||
#endif
|
||||
SYSCTL_NODE(_kern, OID_AUTO, features, CTLFLAG_RD, 0, "Kernel Features");
|
||||
#ifndef __rtems__
|
||||
|
||||
#ifndef __rtems__
|
||||
#ifdef COMPAT_FREEBSD4
|
||||
FEATURE(compat_freebsd4, "Compatible with FreeBSD 4");
|
||||
#endif
|
||||
|
@ -37,10 +37,6 @@
|
||||
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
|
||||
*/
|
||||
|
||||
#ifdef __rtems__
|
||||
/* FIXME */
|
||||
#undef sysctl
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
@ -67,16 +63,10 @@ __FBSDID("$FreeBSD$");
|
||||
#include <net/vnet.h>
|
||||
|
||||
#include <security/mac/mac_framework.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
#ifdef __rtems__
|
||||
/* From FreeBSD file 'sys/kern/kern_mib.c' */
|
||||
SYSCTL_NODE(, 0, sysctl, CTLFLAG_RW, 0, "Sysctl internal magic");
|
||||
SYSCTL_NODE(, CTL_KERN, kern, CTLFLAG_RW, 0, "High kernel, proc, limits &c");
|
||||
SYSCTL_NODE(, CTL_DEBUG, debug, CTLFLAG_RW, 0, "Debugging");
|
||||
SYSCTL_NODE(, CTL_HW, hw, CTLFLAG_RW, 0, "hardware");
|
||||
#endif /* __rtems__ */
|
||||
static MALLOC_DEFINE(M_SYSCTL, "sysctl", "sysctl internal magic");
|
||||
static MALLOC_DEFINE(M_SYSCTLOID, "sysctloid", "sysctl dynamic oids");
|
||||
static MALLOC_DEFINE(M_SYSCTLTMP, "sysctltmp", "sysctl temp output buffer");
|
||||
|
Loading…
x
Reference in New Issue
Block a user