Changeset a3d804a in rtems-libbsd


Ignore:
Timestamp:
Oct 31, 2013, 8:33:13 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
45d74f2
Parents:
6da9b23
git-author:
Sebastian Huber <sebastian.huber@…> (10/31/13 08:33:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/13 12:18:54)
Message:

SYSCTL(9): Avoid multiple definitions

Location:
freebsd/sys/kern
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/kern/kern_mib.c

    r6da9b23 ra3d804a  
    4747#include <rtems/bsd/sys/param.h>
    4848#include <sys/kernel.h>
    49 #ifndef __rtems__
    5049#include <sys/sbuf.h>
    51 #endif
    5250#include <sys/systm.h>
    5351#include <sys/sysctl.h>
    5452#include <sys/proc.h>
    55 #ifndef __rtems__
    5653#include <rtems/bsd/sys/lock.h>
    5754#include <sys/mutex.h>
     
    5956#include <sys/smp.h>
    6057#include <sys/sx.h>
    61 #endif
    6258#include <rtems/bsd/sys/unistd.h>
    63 
    64 #ifdef __rtems__
    65 char machine[] = "SET ME";
    66 char osrelease[] = RTEMS_VERSION;
    67 char ostype[] = "RTEMS";
    68 #endif
    6959
    7060SYSCTL_NODE(, 0,          sysctl, CTLFLAG_RW, 0,
     
    7767SYSCTL_NODE(, CTL_VFS,    vfs,     CTLFLAG_RW, 0,
    7868        "File system");
    79 #endif
     69#endif /* __rtems__ */
    8070SYSCTL_NODE(, CTL_NET,    net,    CTLFLAG_RW, 0,
    8171        "Network, (see socket.h)");
    82 #ifndef __rtems__
    8372SYSCTL_NODE(, CTL_DEBUG,  debug,  CTLFLAG_RW, 0,
    8473        "Debugging");
     74#ifndef __rtems__
    8575SYSCTL_NODE(_debug, OID_AUTO,  sizeof,  CTLFLAG_RW, 0,
    8676        "Sizeof various things");
     77#endif /* __rtems__ */
    8778SYSCTL_NODE(, CTL_HW,     hw,     CTLFLAG_RW, 0,
    8879        "hardware");
     80#ifndef __rtems__
    8981SYSCTL_NODE(, CTL_MACHDEP, machdep, CTLFLAG_RW, 0,
    9082        "machine dependent");
     
    9789        "Compatibility code");
    9890#endif /* __rtems__ */
    99 SYSCTL_NODE(, OID_AUTO, security, CTLFLAG_RW, 0,
     91SYSCTL_NODE(, OID_AUTO, security, CTLFLAG_RW, 0, 
    10092        "Security");
    10193#ifndef __rtems__
     
    10799SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD|CTLFLAG_MPSAFE,
    108100    kern_ident, 0, "Kernel identifier");
    109 #endif /* __rtems__ */
    110101
    111102SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD|CTLFLAG_MPSAFE,
     
    115106    0, BSD, "Operating system revision");
    116107
    117 #ifndef __rtems__
    118108SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD|CTLFLAG_MPSAFE,
    119109    version, 0, "Kernel version");
    120 #endif
    121110
    122111SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD|CTLFLAG_MPSAFE,
    123112    ostype, 0, "Operating system type");
    124113
    125 #ifndef __rtems__
    126114/*
    127115 * NOTICE: The *userland* release date is available in
     
    406394}
    407395
    408 SYSCTL_PROC(_kern, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RW,
     396SYSCTL_PROC(_kern, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RW, 
    409397    0, 0, sysctl_kern_config, "", "Kernel configuration file");
    410398#endif
     
    447435    CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
    448436    NULL, 0, sysctl_hostid, "LU", "Host ID");
    449 
    450 #endif
     437#endif /* __rtems__ */
     438
    451439SYSCTL_NODE(_kern, OID_AUTO, features, CTLFLAG_RD, 0, "Kernel Features");
     440
    452441#ifndef __rtems__
    453 
    454442#ifdef COMPAT_FREEBSD4
    455443FEATURE(compat_freebsd4, "Compatible with FreeBSD 4");
  • freebsd/sys/kern/kern_sysctl.c

    r6da9b23 ra3d804a  
    3838 */
    3939
    40 #ifdef __rtems__
    41 /* FIXME */
    42 #undef sysctl
    43 #endif /* __rtems__ */
    4440#include <sys/cdefs.h>
    4541__FBSDID("$FreeBSD$");
     
    6864
    6965#include <security/mac/mac_framework.h>
     66
    7067#include <vm/vm.h>
    7168#include <vm/vm_extern.h>
    7269
    73 #ifdef __rtems__
    74 /* From FreeBSD file 'sys/kern/kern_mib.c' */
    75 SYSCTL_NODE(, 0, sysctl, CTLFLAG_RW, 0, "Sysctl internal magic");
    76 SYSCTL_NODE(, CTL_KERN, kern, CTLFLAG_RW, 0, "High kernel, proc, limits &c");
    77 SYSCTL_NODE(, CTL_DEBUG, debug, CTLFLAG_RW, 0, "Debugging");
    78 SYSCTL_NODE(, CTL_HW, hw, CTLFLAG_RW, 0, "hardware");
    79 #endif /* __rtems__ */
    8070static MALLOC_DEFINE(M_SYSCTL, "sysctl", "sysctl internal magic");
    8171static MALLOC_DEFINE(M_SYSCTLOID, "sysctloid", "sysctl dynamic oids");
Note: See TracChangeset for help on using the changeset viewer.