Changeset 1917 for trunk


Ignore:
Timestamp:
Apr 26, 2005, 2:48:42 AM (20 years ago)
Author:
bird
Message:

Heavy hacking.

Location:
trunk/src/emx/src/lib/misc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/misc/sysctl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1916 r1917  
    3636 */
    3737
     38#include "libc-alias.h"
    3839#include <sys/cdefs.h>
    39 __FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.159 2004/07/28 06:42:41 kan Exp $");
    40 
    41 #include "opt_compat.h"
    42 #include "opt_mac.h"
     40//__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.159 2004/07/28 06:42:41 kan Exp $");
    4341
    4442#include <sys/param.h>
    45 #include <sys/systm.h>
    46 #include <sys/kernel.h>
     43#define _KERNEL
    4744#include <sys/sysctl.h>
    48 #include <sys/mac.h>
    49 #include <sys/malloc.h>
    50 #include <sys/proc.h>
    51 #include <sys/lock.h>
    52 #include <sys/mutex.h>
    53 #include <sys/sx.h>
    54 #include <sys/sysproto.h>
    55 #include <vm/vm.h>
    56 #include <vm/vm_extern.h>
    57 
    58 static MALLOC_DEFINE(M_SYSCTL, "sysctl", "sysctl internal magic");
    59 static MALLOC_DEFINE(M_SYSCTLOID, "sysctloid", "sysctl dynamic oids");
    60 static MALLOC_DEFINE(M_SYSCTLTMP, "sysctltmp", "sysctl temp output buffer");
     45#include <386/builtin.h>
     46#include <sys/fmutex.h>
     47#include <sys/smutex.h>
     48#include <errno.h>
     49#include <string.h>
     50#include <stdio.h>
     51
     52#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
     53#include <InnoTekLIBC/logstrict.h>
     54#undef printf
     55#define printf LIBCLOG_MSG2
     56#undef panic
     57#define panic LIBC_ASSERTM_FAILED
     58#undef copyout
     59#define copyout(x,y,z)  !memcpy((y),(x),(z))
     60#undef copyin
     61#define copyin(x,y,z)   !memcpy((y),(x),(z))
     62#undef securelevel_gt
     63#define securelevel_gt(cr, level) 0
    6164
    6265/*
    6366 * Locking - this locks the sysctl tree in memory.
    6467 */
    65 static struct sx sysctllock;
    66 
    67 #define SYSCTL_LOCK()           sx_xlock(&sysctllock)
    68 #define SYSCTL_UNLOCK()         sx_xunlock(&sysctllock)
    69 #define SYSCTL_INIT()           sx_init(&sysctllock, "sysctl lock")
     68static _fmutex sysctllock;
     69
     70#define SYSCTL_LOCK()           _fmutex_request(&sysctllock, 0)
     71#define SYSCTL_UNLOCK()         _fmutex_release(&sysctllock)
     72#define SYSCTL_INIT()           _fmutex_create2(&sysctllock, 0, "sysctl lock")
    7073
    7174static int sysctl_root(SYSCTL_HANDLER_ARGS);
     
    9295 */
    9396
    94 void
     97static void
    9598sysctl_register_oid(struct sysctl_oid *oidp)
    9699{
     
    149152}
    150153
     154#if 0 /* no dynamic stuff */
    151155void
    152156sysctl_unregister_oid(struct sysctl_oid *oidp)
     
    169173        }
    170174
    171         /* 
     175        /*
    172176         * This can happen when a module fails to register and is
    173177         * being unloaded afterwards.  It should not be a panic()
     
    177181                printf("%s: failed to unregister sysctl\n", __func__);
    178182}
     183#endif /* no dynamic stuff */
     184
     185
     186#if 0 /* no context stuff */
    179187
    180188/* Initialize a new context to keep track of dynamically added sysctls. */
     
    288296}
    289297
     298#endif /* no context stuff */
     299
     300#if 0 /* no dynamic stuff. */
    290301/*
    291302 * Remove dynamically created sysctl trees.
     
    431442        return (0);
    432443}
     444#endif /* no dynamic stuff. */
     445
    433446
    434447/*
    435448 * Register the kernel's oids on startup.
    436449 */
    437 SET_DECLARE(sysctl_set, struct sysctl_oid);
    438 
    439450static void
    440451sysctl_register_all(void *arg)
     
    443454
    444455        SYSCTL_INIT();
    445         SET_FOREACH(oidp, sysctl_set)
    446                 sysctl_register_oid(*oidp);
    447 }
    448 SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_all, 0);
    449 
     456        extern int __sysctl_set__;
     457        int *ptr = &__sysctl_set__;
     458        if (*ptr == -2)
     459            for (oidp = (struct sysctl_oid **)(ptr + 1); *oidp != NULL; oidp++)
     460                sysctl_register_oid(*oidp);
     461        else
     462        {
     463            if (*ptr == -1) --ptr;      /* Fix GNU ld bug */
     464            int n = *ptr++;              /* Get size of vector */
     465            if (*ptr == -1)             /* First element must be -1, see crt0.s */
     466                for (oidp = (struct sysctl_oid **)(ptr + 1); n > 1; oidp++, n--)
     467                    sysctl_register_oid(*oidp);
     468        }
     469
     470}
     471//SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_all, 0);
     472
     473#if 0 /* no debug stuff just yet */
    450474/*
    451475 * "Staff-functions"
    452476 *
    453  * These functions implement a presently undocumented interface 
     477 * These functions implement a presently undocumented interface
    454478 * used by the sysctl program to walk the tree, and get the type
    455479 * so it can print the value.
     
    519543SYSCTL_PROC(_sysctl, 0, debug, CTLTYPE_STRING|CTLFLAG_RD,
    520544        0, 0, sysctl_sysctl_debug, "-", "");
     545#endif /* no debug stuff just yet */
    521546
    522547static int
     
    559584                        name++;
    560585
    561                         if ((oid->oid_kind & CTLTYPE) != CTLTYPE_NODE) 
     586                        if ((oid->oid_kind & CTLTYPE) != CTLTYPE_NODE)
    562587                                break;
    563588
     
    576601
    577602static int
    578 sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *name, u_int namelen, 
     603sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *name, u_int namelen,
    579604        int *next, int *len, int level, struct sysctl_oid **oidpp)
    580605{
     
    590615
    591616                if (!namelen) {
    592                         if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) 
     617                        if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE)
    593618                                return 0;
    594                         if (oidp->oid_handler) 
     619                        if (oidp->oid_handler)
    595620                                /* We really should call the handler here...*/
    596621                                return 0;
    597622                        lsp = (struct sysctl_oid_list *)oidp->oid_arg1;
    598                         if (!sysctl_sysctl_next_ls(lsp, 0, 0, next+1, 
     623                        if (!sysctl_sysctl_next_ls(lsp, 0, 0, next+1,
    599624                                len, level+1, oidpp))
    600625                                return 0;
     
    611636                                return 0;
    612637                        lsp = (struct sysctl_oid_list *)oidp->oid_arg1;
    613                         if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, 
     638                        if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1,
    614639                                next+1, len, level+1, oidpp))
    615640                                return (0);
     
    623648
    624649                lsp = (struct sysctl_oid_list *)oidp->oid_arg1;
    625                 if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, next+1, 
     650                if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, next+1,
    626651                        len, level+1, oidpp))
    627652                        return (0);
     
    670695        *len = 0;
    671696
    672         for (p = name; *p && *p != '.'; p++) 
     697        for (p = name; *p && *p != '.'; p++)
    673698                ;
    674699        i = *p;
     
    701726                oidp = SLIST_FIRST(lsp);
    702727                name = p+1;
    703                 for (p = name; *p && *p != '.'; p++) 
     728                for (p = name; *p && *p != '.'; p++)
    704729                                ;
    705730                i = *p;
     
    717742        struct sysctl_oid *op = 0;
    718743
    719         if (!req->newlen) 
     744        if (!req->newlen)
    720745                return ENOENT;
    721746        if (req->newlen >= MAXPATHLEN)  /* XXX arbitrary, undocumented */
    722747                return (ENAMETOOLONG);
    723748
    724         p = malloc(req->newlen+1, M_SYSCTL, M_WAITOK);
     749        p = malloc(req->newlen+1/*, M_SYSCTL, M_WAITOK*/);
    725750
    726751        error = SYSCTL_IN(req, p, req->newlen);
    727752        if (error) {
    728                 free(p, M_SYSCTL);
     753                free(p/*, M_SYSCTL*/);
    729754                return (error);
    730755        }
     
    734759        error = name2oid(p, oid, &len, &op);
    735760
    736         free(p, M_SYSCTL);
     761        free(p/*, M_SYSCTL*/);
    737762
    738763        if (error)
     
    743768}
    744769
    745 SYSCTL_PROC(_sysctl, 3, name2oid, CTLFLAG_RW|CTLFLAG_ANYBODY, 0, 0, 
     770SYSCTL_PROC(_sysctl, 3, name2oid, CTLFLAG_RW|CTLFLAG_ANYBODY, 0, 0,
    746771        sysctl_sysctl_name2oid, "I", "");
     772
     773static int
     774sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid,
     775    int *nindx, struct sysctl_req *req);
    747776
    748777static int
     
    866895retry:
    867896        outlen = strlen((char *)arg1)+1;
    868         tmparg = malloc(outlen, M_SYSCTLTMP, M_WAITOK);
     897        tmparg = malloc(outlen/*, M_SYSCTLTMP, M_WAITOK*/);
    869898
    870899        if (strlcpy(tmparg, (char *)arg1, outlen) >= outlen) {
    871                 free(tmparg, M_SYSCTLTMP);
     900                free(tmparg/*, M_SYSCTLTMP*/);
    872901                goto retry;
    873902        }
    874903
    875904        error = SYSCTL_OUT(req, tmparg, outlen);
    876         free(tmparg, M_SYSCTLTMP);
     905        free(tmparg/*, M_SYSCTLTMP*/);
    877906
    878907        if (error || !req->newptr)
     
    898927sysctl_handle_opaque(SYSCTL_HANDLER_ARGS)
    899928{
    900         int error, tries;
    901         u_int generation;
     929        int error/*, tries*/;
     930//      u_int generation;
    902931        struct sysctl_req req2;
    903932
     
    909938         * If we encounter an error, stop immediately.
    910939         */
    911         tries = 0;
     940//      tries = 0;
    912941        req2 = *req;
    913 retry:
    914         generation = curthread->td_generation;
     942//retry:
     943        //generation = curthread->td_generation;
    915944        error = SYSCTL_OUT(req, arg1, arg2);
    916945        if (error)
    917946                return (error);
    918         tries++;
    919         if (generation != curthread->td_generation && tries < 3) {
    920                 *req = req2;
    921                 goto retry;
    922         }
     947        //tries++;
     948        //if (generation != curthread->td_generation && tries < 3) {
     949        //      *req = req2;
     950        //      goto retry;
     951        //}
    923952
    924953        error = SYSCTL_IN(req, arg1, arg2);
     
    927956}
    928957
     958#if 0 /* not used */
    929959/*
    930960 * Transfer functions to/from kernel space.
     
    9971027        error = sysctl_root(0, name, namelen, &req);
    9981028
    999         if (req.lock == REQ_WIRED && req.validlen > 0)
    1000                 vsunlock(req.oldptr, req.validlen);
     1029        //if (req.lock == REQ_WIRED && req.validlen > 0)
     1030        //      vsunlock(req.oldptr, req.validlen);
    10011031
    10021032        SYSCTL_UNLOCK();
     
    10351065        return (error);
    10361066}
     1067#endif /* not used */
    10371068
    10381069/*
     
    10491080        if (req->oldptr == NULL)
    10501081                return (0);
    1051         if (req->lock == REQ_LOCKED)
    1052                 WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
    1053                     "sysctl_old_user()");
     1082        //if (req->lock == REQ_LOCKED)
     1083        //      WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
     1084        //          "sysctl_old_user()");
    10541085        i = l;
    10551086        len = req->validlen;
     
    10821113}
    10831114
     1115#if 0 /* don't need you.. */
    10841116/*
    10851117 * Wire the user space destination buffer.  If set to a value greater than
     
    11131145        return (0);
    11141146}
    1115 
    1116 int
     1147#endif /* don't need you.. */
     1148
     1149static int
    11171150sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid,
    11181151    int *nindx, struct sysctl_req *req)
     
    11821215                return (EPERM);
    11831216
    1184         KASSERT(req->td != NULL, ("sysctl_root(): req->td == NULL"));
     1217        //KASSERT(req->td != NULL, ("sysctl_root(): req->td == NULL"));
    11851218
    11861219        /* Is this sysctl sensitive to securelevels? */
     
    11941227        /* Is this sysctl writable by only privileged users? */
    11951228        if (req->newptr && !(oid->oid_kind & CTLFLAG_ANYBODY)) {
     1229#if 0 //ignore
    11961230                int flags;
    11971231
     
    12031237                if (error)
    12041238                        return (error);
     1239#endif
    12051240        }
    12061241
     
    12251260        return (error);
    12261261}
     1262
     1263static int
     1264userland_sysctl(struct thread *td, int *name, u_int namelen, void *old,
     1265    size_t *oldlenp, int inkernel, void *new, size_t newlen, size_t *retval);
    12271266
    12281267#ifndef _SYS_SYSPROTO_H_
     
    12371276#endif
    12381277
     1278#if 0 /* see bottom */
    12391279/*
    12401280 * MPSAFE
    12411281 */
    1242 int
     1282static int
    12431283__sysctl(struct thread *td, struct sysctl_args *uap)
    12441284{
     
    12691309        return (error);
    12701310}
     1311#endif
    12711312
    12721313/*
     
    12741315 * must be in kernel space.
    12751316 */
    1276 int
     1317static int
    12771318userland_sysctl(struct thread *td, int *name, u_int namelen, void *old,
    12781319    size_t *oldlenp, int inkernel, void *new, size_t newlen, size_t *retval)
     
    12971338
    12981339        if (old) {
    1299                 if (!useracc(old, req.oldlen, VM_PROT_WRITE))
    1300                         return (EFAULT);
     1340                //if (!useracc(old, req.oldlen, VM_PROT_WRITE))
     1341                //      return (EFAULT);
    13011342                req.oldptr= old;
    13021343        }
    13031344
    13041345        if (new != NULL) {
    1305                 if (!useracc(new, req.newlen, VM_PROT_READ))
    1306                         return (EFAULT);
     1346                //if (!useracc(new, req.newlen, VM_PROT_READ))
     1347                //      return (EFAULT);
    13071348                req.newlen = newlen;
    13081349                req.newptr = new;
     
    13211362        } while (error == EAGAIN);
    13221363
    1323         if (req.lock == REQ_WIRED && req.validlen > 0)
    1324                 vsunlock(req.oldptr, req.validlen);
     1364        //if (req.lock == REQ_WIRED && req.validlen > 0)
     1365        //      vsunlock(req.oldptr, req.validlen);
    13251366
    13261367        SYSCTL_UNLOCK();
     
    15541595}
    15551596#endif /* COMPAT_43 */
     1597
     1598
     1599/**
     1600 * BSD like sysctl interface.
     1601 *
     1602 * This does not support half of the objects and operations as the real thing,
     1603 * but it's enough to get around bothersome patching elsewhere.
     1604 *
     1605 */
     1606int _STD(sysctl)(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen)
     1607{
     1608    int     error;
     1609    size_t  j;
     1610
     1611    /*
     1612     * Lazy init
     1613     */
     1614    static _smutex  smtx;
     1615    static int      fInitialized = 0;
     1616    _smutex_request(&smtx);
     1617    if (!fInitialized)
     1618    {
     1619        sysctl_register_all(NULL);
     1620        fInitialized = 1;
     1621    }
     1622    _smutex_release(&smtx);
     1623
     1624    /*
     1625     * Validate input.
     1626     */
     1627    if (namelen > CTL_MAXNAME || namelen < 2)
     1628        return (EINVAL);
     1629
     1630    /*
     1631     * Do work.
     1632     */
     1633    error = userland_sysctl((struct thread *)(void *)&userland_sysctl, name, namelen, oldp, oldlenp, 0, newp, newlen, &j);
     1634
     1635    /*
     1636     * Handle the result.
     1637     */
     1638    if (error && error != ENOMEM) /* (ENOMEM is used for buffer size conditions). */
     1639        ;
     1640    else if (oldlenp)
     1641        *oldlenp = j;
     1642    if (!error)
     1643        return 0;
     1644    errno = error;
     1645    return -1;
     1646
     1647}
     1648
  • trunk/src/emx/src/lib/misc/sysctl_mib.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1916 r1917  
    3636 */
    3737
     38#include "libc-alias.h"
    3839#include <sys/cdefs.h>
    39 __FBSDID("$FreeBSD: src/sys/kern/kern_mib.c,v 1.71 2004/04/05 21:03:34 imp Exp $");
    40 
    41 #include "opt_posix.h"
     40//__FBSDID("$FreeBSD: src/sys/kern/kern_mib.c,v 1.71 2004/04/05 21:03:34 imp Exp $");
     41
     42//#include "opt_posix.h"
    4243
    4344#include <sys/param.h>
    44 #include <sys/kernel.h>
    45 #include <sys/systm.h>
     45#include <sys/unistd.h>
     46#define _KERNEL
    4647#include <sys/sysctl.h>
    47 #include <sys/proc.h>
    48 #include <sys/lock.h>
    49 #include <sys/mutex.h>
    50 #include <sys/jail.h>
    51 #include <sys/smp.h>
    52 #include <sys/unistd.h>
     48
     49
     50asm (".stabs  \"___sysctl_set__\", 21, 0, 0, 0xffffffff\n");
    5351
    5452SYSCTL_NODE(, 0,          sysctl, CTLFLAG_RW, 0,
     
    7775SYSCTL_NODE(, OID_AUTO,  compat, CTLFLAG_RW, 0,
    7876        "Compatibility code");
    79 SYSCTL_NODE(, OID_AUTO, security, CTLFLAG_RW, 0, 
     77SYSCTL_NODE(, OID_AUTO, security, CTLFLAG_RW, 0,
    8078        "Security");
    8179#ifdef REGRESSION
     
    8482#endif
    8583
    86 SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD,
    87     kern_ident, 0, "Kernel identifier");
    88 
    89 SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD,
    90     osrelease, 0, "Operating system release");
    91 
    92 SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD,
    93     0, BSD, "Operating system revision");
    94 
    95 SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD,
    96     version, 0, "Kernel version");
    97 
    98 SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD,
    99     ostype, 0, "Operating system type");
     84//SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD,
     85//    kern_ident, 0, "Kernel identifier");
     86
     87//SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD,
     88//    osrelease, 0, "Operating system release");
     89
     90//SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD,
     91//    0, BSD, "Operating system revision");
     92
     93//SYSCTL_STRING(_kern, KERN_VERSION, version, CTLFLAG_RD,
     94//    version, 0, "Kernel version");
     95
     96//SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD,
     97//    ostype, 0, "Operating system type");
    10098
    10199/*
     
    103101 * /usr/include/osreldate.h
    104102 */
    105 extern int osreldate;
    106 SYSCTL_INT(_kern, KERN_OSRELDATE, osreldate, CTLFLAG_RD,
    107     &osreldate, 0, "Kernel release date");
    108 
    109 SYSCTL_INT(_kern, KERN_MAXPROC, maxproc, CTLFLAG_RDTUN,
    110     &maxproc, 0, "Maximum number of processes");
    111 
    112 SYSCTL_INT(_kern, KERN_MAXPROCPERUID, maxprocperuid, CTLFLAG_RW,
    113     &maxprocperuid, 0, "Maximum processes allowed per userid");
    114 
    115 SYSCTL_INT(_kern, OID_AUTO, maxusers, CTLFLAG_RDTUN,
    116     &maxusers, 0, "Hint for kernel tuning");
     103//extern int osreldate;
     104//SYSCTL_INT(_kern, KERN_OSRELDATE, osreldate, CTLFLAG_RD,
     105//    &osreldate, 0, "Kernel release date");
     106
     107//SYSCTL_INT(_kern, KERN_MAXPROC, maxproc, CTLFLAG_RDTUN,
     108//    &maxproc, 0, "Maximum number of processes");
     109
     110//SYSCTL_INT(_kern, KERN_MAXPROCPERUID, maxprocperuid, CTLFLAG_RW,
     111//    &maxprocperuid, 0, "Maximum processes allowed per userid");
     112
     113//SYSCTL_INT(_kern, OID_AUTO, maxusers, CTLFLAG_RDTUN,
     114//    &maxusers, 0, "Hint for kernel tuning");
    117115
    118116SYSCTL_INT(_kern, KERN_ARGMAX, argmax, CTLFLAG_RD,
     
    136134#endif
    137135
    138 char kernelname[MAXPATHLEN] = "/kernel";        /* XXX bloat */
    139 
    140 SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW,
    141     kernelname, sizeof kernelname, "Name of kernel file booted");
     136//char kernelname[MAXPATHLEN] = "/kernel";      /* XXX bloat */
     137//
     138//SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW,
     139//    kernelname, sizeof kernelname, "Name of kernel file booted");
    142140
    143141#ifdef SMP
     
    155153    0, PAGE_SIZE, "System memory page size");
    156154
     155#if 0
    157156static int
    158157sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
     
    178177SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG | CTLFLAG_RD,
    179178        0, 0, sysctl_hw_usermem, "LU", "");
    180 
    181 SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
    182 
    183 static char     machine_arch[] = MACHINE_ARCH;
    184 SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD,
    185     machine_arch, 0, "System architecture");
    186 
     179#endif
     180
     181//SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
     182
     183//static char   machine_arch[] = MACHINE_ARCH;
     184//SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD,
     185//    machine_arch, 0, "System architecture");
     186
     187#if 0
    187188char hostname[MAXHOSTNAMELEN];
    188189
     
    228229       CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_PRISON,
    229230       0, 0, sysctl_hostname, "A", "Hostname");
    230 
     231#endif /* no hostname stuff yet. */
     232
     233#if 0/* no stuff of this kind either. */
    231234static int      regression_securelevel_nonmonotonic = 0;
    232235
     
    299302u_long hostid;
    300303SYSCTL_ULONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID");
     304#endif /* no stuff of this kind either. */
    301305
    302306/*
     
    346350    0, 0, "Min Maximum number of types supported for timezone names");
    347351
     352#if 0 /* no sizes and stuff */
    348353#include <sys/vnode.h>
    349354SYSCTL_INT(_debug_sizeof, OID_AUTO, vnode, CTLFLAG_RD,
     
    374379    &__elfN(fallback_brand), sizeof(__elfN(fallback_brand)),
    375380    "compatibility for kern.fallback_elf_brand");
     381
     382#endif /* no sizes and stuff */
     383
Note: See TracChangeset for help on using the changeset viewer.