<?xml version='1.0' encoding='UTF-8' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16"> <compounddef id="kern__sysctl_8c" kind="file" language="C++"> <compoundname>kern_sysctl.c</compoundname> <includes refid="kern__sysctl_8h" local="no">sys/kern_sysctl.h</includes> <includes refid="sysproto__posix_8h" local="no">sys/sysproto_posix.h</includes> <includes refid="thread_8h" local="no">sys/thread.h</includes> <includes refid="endtask_8h" local="no">ubixos/endtask.h</includes> <includes refid="kpanic_8h" local="no">ubixos/kpanic.h</includes> <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes> <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes> <includes refid="assert_8h" local="no">assert.h</includes> <includes refid="string_8h" local="no">string.h</includes> <includes refid="ubixos_2errno_8h" local="no">ubixos/errno.h</includes> <includes refid="kern__trie_8h" local="no">lib/kern_trie.h</includes> <incdepgraph> <node id="22"> <label>ufs/ufs.h</label> <link refid="ufs_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="23" relation="include"> </childnode> </node> <node id="31"> <label>stdarg.h</label> <link refid="stdarg_8h"/> </node> <node id="29"> <label>ubixos/kpanic.h</label> <link refid="kpanic_8h"/> </node> <node id="28"> <label>sys/tss.h</label> <link refid="tss_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="25"> <label>ubixos/endtask.h</label> <link refid="endtask_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="26" relation="include"> </childnode> </node> <node id="36"> <label>ubixos/errno.h</label> <link refid="ubixos_2errno_8h"/> </node> <node id="27"> <label>ubixos/tty.h</label> <link refid="tty_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="37"> <label>lib/kern_trie.h</label> <link refid="kern__trie_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="35"> <label>strings.h</label> <link refid="strings_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="14"> <label>i386/cpu.h</label> <link refid="i386_2cpu_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="7"> <label>sys/select.h</label> <link refid="select_8h"/> <childnode refid="8" relation="include"> </childnode> <childnode refid="6" relation="include"> </childnode> <childnode refid="9" relation="include"> </childnode> <childnode refid="10" relation="include"> </childnode> <childnode refid="11" relation="include"> </childnode> </node> <node id="18"> <label>vfs/inode.h</label> <link refid="inode_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="19" relation="include"> </childnode> <childnode refid="20" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> </node> <node id="11"> <label>sys/_sigset.h</label> <link refid="__sigset_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="1"> <label>C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c</label> <link refid="kern__sysctl_8c"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="3" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> <childnode refid="25" relation="include"> </childnode> <childnode refid="29" relation="include"> </childnode> <childnode refid="30" relation="include"> </childnode> <childnode refid="32" relation="include"> </childnode> <childnode refid="33" relation="include"> </childnode> <childnode refid="34" relation="include"> </childnode> <childnode refid="36" relation="include"> </childnode> <childnode refid="37" relation="include"> </childnode> </node> <node id="32"> <label>lib/kmalloc.h</label> <link refid="kmalloc_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="24"> <label>vfs/mount.h</label> <link refid="mount_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="15"> <label>sys/resource.h</label> <link refid="resource_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="13"> <label>sys/trap.h</label> <link refid="trap_8h"/> <childnode refid="14" relation="include"> </childnode> </node> <node id="34"> <label>string.h</label> <link refid="string_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="35" relation="include"> </childnode> </node> <node id="2"> <label>sys/kern_sysctl.h</label> <link refid="kern__sysctl_8h"/> <childnode refid="3" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> </node> <node id="5"> <label>sys/types.h</label> <link refid="include_2sys_2types_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="7" relation="include"> </childnode> </node> <node id="16"> <label>vfs/file.h</label> <link refid="include_2vfs_2file_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="17" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> <childnode refid="18" relation="include"> </childnode> <childnode refid="24" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> </node> <node id="21"> <label>fs/msdos_fs.h</label> <link refid="msdos__fs_8h"/> </node> <node id="33"> <label>assert.h</label> <link refid="assert_8h"/> </node> <node id="4"> <label>sys/signal.h</label> <link refid="sys_2signal_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="20"> <label>fs/pipe_fs.h</label> <link refid="pipe__fs_8h"/> </node> <node id="19"> <label>ubixos/wait.h</label> <link refid="wait_8h"/> </node> <node id="30"> <label>lib/kprintf.h</label> <link refid="kprintf_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="31" relation="include"> </childnode> </node> <node id="12"> <label>sys/thread.h</label> <link refid="thread_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="13" relation="include"> </childnode> <childnode refid="4" relation="include"> </childnode> <childnode refid="15" relation="include"> </childnode> </node> <node id="8"> <label>sys/cdefs.h</label> <link refid="cdefs_8h"/> </node> <node id="26"> <label>ubixos/sched.h</label> <link refid="sched_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="16" relation="include"> </childnode> <childnode refid="27" relation="include"> </childnode> <childnode refid="28" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> </node> <node id="6"> <label>sys/_types.h</label> <link refid="__types_8h"/> </node> <node id="9"> <label>sys/_timespec.h</label> <link refid="__timespec_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="23"> <label>sys/device.h</label> <link refid="include_2sys_2device_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="3"> <label>sys/sysproto_posix.h</label> <link refid="sysproto__posix_8h"/> <childnode refid="4" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> <childnode refid="16" relation="include"> </childnode> </node> <node id="17"> <label>ubixfs/dirCache.h</label> <link refid="dirCache_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="10"> <label>sys/_timeval.h</label> <link refid="__timeval_8h"/> <childnode refid="6" relation="include"> </childnode> </node> </incdepgraph> <sectiondef kind="var"> <memberdef kind="variable" id="kern__sysctl_8c_1a78853afaf5035f2ad68feeb8ebf184b1" prot="public" static="yes" mutable="no"> <type>struct <ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref> *</type> <definition>struct sysctl_entry* ctls</definition> <argsstring></argsstring> <name>ctls</name> <initializer>= 0x0</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="41" column="26" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="41" bodyend="-1"/> </memberdef> <memberdef kind="variable" id="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" prot="public" static="no" mutable="no"> <type>struct <ref refid="structTrie" kindref="compound">Trie</ref> *</type> <definition>struct Trie* sysctl_headTrie</definition> <argsstring></argsstring> <name>sysctl_headTrie</name> <initializer>= 0x0</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="46" column="11" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="46" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="func"> <memberdef kind="function" id="kern__sysctl_8c_1a39f7224161f94ec8b8324bd4b51ea7a4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>int</type> <definition>int __sysctl</definition> <argsstring>(struct thread *td, struct sysctl_args *uap)</argsstring> <name>__sysctl</name> <param> <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type> <declname>td</declname> </param> <param> <type>struct <ref refid="structsysctl__args" kindref="compound">sysctl_args</ref> *</type> <declname>uap</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="255" column="5" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="255" bodyend="284"/> </memberdef> <memberdef kind="function" id="kern__sysctl_8c_1a23c118948f8d574b180e46e55ce2ec5c" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void def_ctls</definition> <argsstring>()</argsstring> <name>def_ctls</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="49" column="13" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="49" bodyend="145"/> </memberdef> <memberdef kind="function" id="kern__sysctl_8c_1a2ae47a1e2ced5a221aab6fb8aa9d5891" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>int</type> <definition>int sys_sysctl</definition> <argsstring>(struct thread *td, struct sys_sysctl_args *args)</argsstring> <name>sys_sysctl</name> <param> <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type> <declname>td</declname> </param> <param> <type>struct <ref refid="structsys__sysctl__args" kindref="compound">sys_sysctl_args</ref> *</type> <declname>args</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="286" column="5" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="286" bodyend="362"/> </memberdef> <memberdef kind="function" id="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>int</type> <definition>int sysctl_add</definition> <argsstring>(int *name, int namelen, char *str_name, void *buf, int buf_size)</argsstring> <name>sysctl_add</name> <param> <type>int *</type> <declname>name</declname> </param> <param> <type>int</type> <declname>namelen</declname> </param> <param> <type>char *</type> <declname>str_name</declname> </param> <param> <type>void *</type> <declname>buf</declname> </param> <param> <type>int</type> <declname>buf_size</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="418" column="5" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="418" bodyend="482"/> </memberdef> <memberdef kind="function" id="kern__sysctl_8c_1a918bcbc96b27123dd871e3fa530f2d01" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>struct <ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref> *</type> <definition>static struct sysctl_entry * sysctl_find</definition> <argsstring>(int *, int)</argsstring> <name>sysctl_find</name> <param> <type>int *</type> <defname>name</defname> </param> <param> <type>int</type> <defname>namelen</defname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="364" column="26" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="364" bodyend="383" declfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" declline="43" declcolumn="26"/> </memberdef> <memberdef kind="function" id="kern__sysctl_8c_1aab34eeda0554ae13f58405d2569594d1" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>struct <ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref> *</type> <definition>static struct sysctl_entry * sysctl_findMib</definition> <argsstring>(char *name, int namelen)</argsstring> <name>sysctl_findMib</name> <param> <type>char *</type> <declname>name</declname> </param> <param> <type>int</type> <declname>namelen</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="386" column="26" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="386" bodyend="415" declfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" declline="44" declcolumn="26"/> </memberdef> <memberdef kind="function" id="kern__sysctl_8c_1a6d1146ba67c212252bb9699a7dc77cbf" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>int</type> <definition>int sysctl_init</definition> <argsstring>()</argsstring> <name>sysctl_init</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" line="147" column="5" bodyfile="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c" bodystart="147" bodyend="253"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <programlisting> <codeline lineno="1"><highlight class="comment">/*-</highlight></codeline> <codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline> <codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline> <codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline> <codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are<sp/>permitted</highlight></codeline> <codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline> <codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline> <codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline> <codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline> <codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline> <codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline> <codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline> <codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline> <codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline> <codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>"AS<sp/>IS"<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline> <codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline> <codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline> <codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline> <codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline> <codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline> <codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline> <codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline> <codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="28"><highlight class="normal"></highlight></codeline> <codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="kern__sysctl_8h" kindref="compound">sys/kern_sysctl.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="sysproto__posix_8h" kindref="compound">sys/sysproto_posix.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="thread_8h" kindref="compound">sys/thread.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="endtask_8h" kindref="compound">ubixos/endtask.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="kpanic_8h" kindref="compound">ubixos/kpanic.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="kmalloc_8h" kindref="compound">lib/kmalloc.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="assert_8h" kindref="compound">assert.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="string_8h" kindref="compound">string.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="ubixos_2errno_8h" kindref="compound">ubixos/errno.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="39"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="kern__trie_8h" kindref="compound">lib/kern_trie.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="40"><highlight class="normal"></highlight></codeline> <codeline lineno="41"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*ctls<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="42"><highlight class="normal"></highlight></codeline> <codeline lineno="43"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*sysctl_find(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="44"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*sysctl_findMib(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>);</highlight></codeline> <codeline lineno="45"><highlight class="normal"></highlight></codeline> <codeline lineno="46" refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structTrie" kindref="compound">Trie</ref><sp/>*<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="47"><highlight class="normal"></highlight></codeline> <codeline lineno="48"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>This<sp/>is<sp/>a<sp/>cheat<sp/>for<sp/>now<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="49"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>def_ctls()<sp/>{</highlight></codeline> <codeline lineno="50"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[<ref refid="kern__sysctl_8h_1a64c10ad2583c04cbc1b4c5ee9269f9ee" kindref="member">CTL_MAXNAME</ref>],<sp/>name_len;</highlight></codeline> <codeline lineno="51"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>page_val<sp/>=<sp/>0x1000;</highlight></codeline> <codeline lineno="52"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a6f6221103820f185abcc62b874665a93" kindref="member">int32_t</ref><sp/>usPage_val<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="53"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>6;</highlight></codeline> <codeline lineno="54"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>7;</highlight></codeline> <codeline lineno="55"><highlight class="normal"><sp/><sp/>name_len<sp/>=<sp/>2;</highlight></codeline> <codeline lineno="56"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"pagesizes"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref>));</highlight></codeline> <codeline lineno="57"><highlight class="normal"></highlight></codeline> <codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Clock<sp/>Rate<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="59"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="60"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>12;</highlight></codeline> <codeline lineno="61"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>0x3E8;</highlight></codeline> <codeline lineno="62"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"page_size"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>));</highlight></codeline> <codeline lineno="63"><highlight class="normal"></highlight></codeline> <codeline lineno="64"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>KERN:<sp/>OS<sp/>Release<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="65"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="66"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>24;</highlight></codeline> <codeline lineno="67"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>101000;</highlight></codeline> <codeline lineno="68"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.osreldate"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>));</highlight></codeline> <codeline lineno="69"><highlight class="normal"></highlight></codeline> <codeline lineno="70"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>KERN:<sp/>User<sp/>Stack<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="71"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="72"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>33;</highlight></codeline> <codeline lineno="73"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>0xCBE8000;</highlight></codeline> <codeline lineno="74"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"page_size"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>));</highlight></codeline> <codeline lineno="75"><highlight class="normal"></highlight></codeline> <codeline lineno="76"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>KERN:<sp/>ARND<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="77"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="78"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>37;</highlight></codeline> <codeline lineno="79"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>0x1;</highlight></codeline> <codeline lineno="80"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern_arnd"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref>));</highlight></codeline> <codeline lineno="81"><highlight class="normal"></highlight></codeline> <codeline lineno="82"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>HW:<sp/>NCPU<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="83"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>6;</highlight></codeline> <codeline lineno="84"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>3;</highlight></codeline> <codeline lineno="85"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>0x1;</highlight></codeline> <codeline lineno="86"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"hw.ncpu"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref>));</highlight></codeline> <codeline lineno="87"><highlight class="normal"></highlight></codeline> <codeline lineno="88"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>9;</highlight></codeline> <codeline lineno="89"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>20;</highlight></codeline> <codeline lineno="90"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>0x4000;</highlight></codeline> <codeline lineno="91"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"p1003_1b.pagesize"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref>));</highlight></codeline> <codeline lineno="92"><highlight class="normal"></highlight></codeline> <codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>1,<sp/>1<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="94"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="95"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="96"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>s11[4]<sp/>=<sp/></highlight><highlight class="stringliteral">"UBIX"</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="97"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.ostype"</highlight><highlight class="normal">,<sp/>&s11,<sp/>4);</highlight></codeline> <codeline lineno="98"><highlight class="normal"></highlight></codeline> <codeline lineno="99"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>1,<sp/>10<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="100"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="101"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>10;</highlight></codeline> <codeline lineno="102"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>s110[16]<sp/>=<sp/></highlight><highlight class="stringliteral">"devel.ubixos.com"</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="103"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.hostname"</highlight><highlight class="normal">,<sp/>&s110,<sp/>16);</highlight></codeline> <codeline lineno="104"><highlight class="normal"></highlight></codeline> <codeline lineno="105"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>1,<sp/>2<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="106"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="107"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>2;</highlight></codeline> <codeline lineno="108"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>s12[11]<sp/>=<sp/></highlight><highlight class="stringliteral">"1.0-RELEASE"</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="109"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.hostname"</highlight><highlight class="normal">,<sp/>&s12,<sp/>11);</highlight></codeline> <codeline lineno="110"><highlight class="normal"></highlight></codeline> <codeline lineno="111"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>1,<sp/>4<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="112"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="113"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>4;</highlight></codeline> <codeline lineno="114"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>s14[18]<sp/>=<sp/></highlight><highlight class="stringliteral">"UbixOS<sp/>1.0-RELEASE"</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="115"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.hostname"</highlight><highlight class="normal">,<sp/>&s14,<sp/>18);</highlight></codeline> <codeline lineno="116"><highlight class="normal"></highlight></codeline> <codeline lineno="117"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>6,<sp/>1<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="118"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>6;</highlight></codeline> <codeline lineno="119"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="120"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>s61[4]<sp/>=<sp/></highlight><highlight class="stringliteral">"i386"</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="121"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.hostname"</highlight><highlight class="normal">,<sp/>&s61,<sp/>4);</highlight></codeline> <codeline lineno="122"><highlight class="normal"></highlight></codeline> <codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>6,<sp/>2147482988<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="124"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>6;</highlight></codeline> <codeline lineno="125"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>2147482988;</highlight></codeline> <codeline lineno="126"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>4096;</highlight></codeline> <codeline lineno="127"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"hw.pagesizes"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1aba29fd78d95cce0ecb249c24b58d07da" kindref="member">u_int32_t</ref>));</highlight></codeline> <codeline lineno="128"><highlight class="normal"></highlight></codeline> <codeline lineno="129"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>2;</highlight></codeline> <codeline lineno="130"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>12;</highlight></codeline> <codeline lineno="131"><highlight class="normal"><sp/><sp/>page_val<sp/>=<sp/>0;</highlight></codeline> <codeline lineno="132"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"vm.overcommit"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1aba29fd78d95cce0ecb249c24b58d07da" kindref="member">u_int32_t</ref>));</highlight></codeline> <codeline lineno="133"><highlight class="normal"></highlight></codeline> <codeline lineno="134"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>1;</highlight></codeline> <codeline lineno="135"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>18;</highlight></codeline> <codeline lineno="136"><highlight class="normal"><sp/><sp/>usPage_val<sp/>=<sp/>1023;</highlight></codeline> <codeline lineno="137"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.ngroups"</highlight><highlight class="normal">,<sp/>&page_val,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1a6f6221103820f185abcc62b874665a93" kindref="member">int32_t</ref>));</highlight></codeline> <codeline lineno="138"><highlight class="normal"></highlight></codeline> <codeline lineno="139"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>6,<sp/>1<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="140"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/>2;</highlight></codeline> <codeline lineno="141"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/>134516822;</highlight></codeline> <codeline lineno="142"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>s62[2]<sp/>=<sp/></highlight><highlight class="stringliteral">"\0"</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="143"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>name_len,<sp/></highlight><highlight class="stringliteral">"kern.msgbuf"</highlight><highlight class="normal">,<sp/>&s62,<sp/>1);</highlight></codeline> <codeline lineno="144"><highlight class="normal"></highlight></codeline> <codeline lineno="145"><highlight class="normal">}</highlight></codeline> <codeline lineno="146"><highlight class="normal"></highlight></codeline> <codeline lineno="147" refid="kern__sysctl_8c_1a6d1146ba67c212252bb9699a7dc77cbf" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kern__sysctl_8c_1a6d1146ba67c212252bb9699a7dc77cbf" kindref="member">sysctl_init</ref>()<sp/>{</highlight></codeline> <codeline lineno="148"><highlight class="normal"></highlight></codeline> <codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*tmpCtl<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="150"><highlight class="normal"></highlight></codeline> <codeline lineno="151"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ctls<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"sysctl<sp/>already<sp/>Initialized\n"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(1)</highlight></codeline> <codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline> <codeline lineno="155"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="156"><highlight class="normal"></highlight></codeline> <codeline lineno="157"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Initialize<sp/>Head<sp/>Trie<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="158"><highlight class="normal"><sp/><sp/><ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structTrie" kindref="compound">Trie</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structTrie" kindref="compound">Trie</ref>));</highlight></codeline> <codeline lineno="159"><highlight class="normal"></highlight></codeline> <codeline lineno="160"><highlight class="normal"><sp/><sp/>ctls<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="161"><highlight class="normal"><sp/><sp/>ctls-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="162"><highlight class="normal"><sp/><sp/>ctls-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1a2d465d8d18db06791908c04b168e26c2" kindref="member">CTL_UNSPEC</ref>;</highlight></codeline> <codeline lineno="163"><highlight class="normal"><sp/><sp/>ctls-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="164"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"unspec"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="165"><highlight class="normal"></highlight></codeline> <codeline lineno="166"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="167"><highlight class="normal"></highlight></codeline> <codeline lineno="168"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="169"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>ctls;</highlight></codeline> <codeline lineno="170"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1ae2217b9898706e75ee4c68263f40f14f" kindref="member">CTL_KERN</ref>;</highlight></codeline> <codeline lineno="171"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="172"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"kern"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="173"><highlight class="normal"><sp/><sp/>ctls-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="174"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="175"><highlight class="normal"></highlight></codeline> <codeline lineno="176"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="177"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="178"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="179"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1af6d848b54abe0956f610dc61df972778" kindref="member">CTL_VM</ref>;</highlight></codeline> <codeline lineno="180"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="181"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"vm"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="182"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="183"><highlight class="normal"></highlight></codeline> <codeline lineno="184"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="185"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="186"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="187"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1a8468f3456b5e69f27996cfa59f73525f" kindref="member">CTL_VFS</ref>;</highlight></codeline> <codeline lineno="188"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="189"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"vfs"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="190"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="191"><highlight class="normal"></highlight></codeline> <codeline lineno="192"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="193"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="194"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="195"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1a95feaa2f7d63c1feead4999e6826b663" kindref="member">CTL_NET</ref>;</highlight></codeline> <codeline lineno="196"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="197"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"net"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="198"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="199"><highlight class="normal"></highlight></codeline> <codeline lineno="200"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="201"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="202"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="203"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1ae6b785c09f229d4721e21ac93c050d25" kindref="member">CTL_DEBUG</ref>;</highlight></codeline> <codeline lineno="204"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="205"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"debug"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="206"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="207"><highlight class="normal"></highlight></codeline> <codeline lineno="208"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="209"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="210"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="211"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1ac5963570c033378ae3a95be4ea4bcd6a" kindref="member">CTL_HW</ref>;</highlight></codeline> <codeline lineno="212"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="213"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"hw"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="214"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="215"><highlight class="normal"></highlight></codeline> <codeline lineno="216"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="217"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="218"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="219"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1aecdcd57f7e07c377f8a3f5d8c3dfc5c3" kindref="member">CTL_MACHDEP</ref>;</highlight></codeline> <codeline lineno="220"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="221"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"machdep"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="222"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="223"><highlight class="normal"></highlight></codeline> <codeline lineno="224"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="225"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="226"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="227"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1a72fbcdd5beae9909011f3b9b96412145" kindref="member">CTL_USER</ref>;</highlight></codeline> <codeline lineno="228"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="229"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"user"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="230"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="231"><highlight class="normal"></highlight></codeline> <codeline lineno="232"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="233"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="234"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="235"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1ae367595aed72f0d28376f41963be0716" kindref="member">CTL_P1003_1B</ref>;</highlight></codeline> <codeline lineno="236"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="237"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"p1003_1b"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="238"><highlight class="normal"></highlight></codeline> <codeline lineno="239"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="240"><highlight class="normal"></highlight></codeline> <codeline lineno="241"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="242"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>tmpCtl;</highlight></codeline> <codeline lineno="243"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>;</highlight></codeline> <codeline lineno="244"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="kern__sysctl_8h_1ac279bc858fea4ae549e51a5382ad7709" kindref="member">CTL_UBIX</ref>;</highlight></codeline> <codeline lineno="245"><highlight class="normal"><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="246"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"ubix"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="247"><highlight class="normal"></highlight></codeline> <codeline lineno="248"><highlight class="normal"><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>ctls-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>ctls);</highlight></codeline> <codeline lineno="249"><highlight class="normal"></highlight></codeline> <codeline lineno="250"><highlight class="normal"><sp/><sp/>def_ctls();</highlight></codeline> <codeline lineno="251"><highlight class="normal"></highlight></codeline> <codeline lineno="252"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline> <codeline lineno="253"><highlight class="normal">}</highlight></codeline> <codeline lineno="254"><highlight class="normal"></highlight></codeline> <codeline lineno="255" refid="kern__sysctl_8c_1a39f7224161f94ec8b8324bd4b51ea7a4" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kern__sysctl_8c_1a39f7224161f94ec8b8324bd4b51ea7a4" kindref="member">__sysctl</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*td,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__args" kindref="compound">sysctl_args</ref><sp/>*uap)<sp/>{</highlight></codeline> <codeline lineno="256"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*tmpCtl<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="257"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;</highlight></codeline> <codeline lineno="258"><highlight class="normal"></highlight></codeline> <codeline lineno="259"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ctls<sp/>==<sp/>0x0)</highlight></codeline> <codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kpanic_8h_1aa5193288597f00c4f8e3b2939aa6c0ce" kindref="member">K_PANIC</ref>(</highlight><highlight class="stringliteral">"sysctl<sp/>not<sp/>initialized"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="261"><highlight class="normal"></highlight></codeline> <codeline lineno="262"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uap-><ref refid="structsysctl__args_1a45cc219865ddc983c32a7a12a692106c" kindref="member">newlen</ref><sp/><<sp/>0)<sp/>{</highlight></codeline> <codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"Changing<sp/>Not<sp/>supported<sp/>yet.\n"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="endtask_8h_1a152c1859ada097cc21071f471bfa2e67" kindref="member">endTask</ref>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-><ref refid="structtaskStruct_1a30966587a60db6b40c8be6c387e11d81" kindref="member">id</ref>);</highlight></codeline> <codeline lineno="265"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="266"><highlight class="normal"></highlight></codeline> <codeline lineno="267"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>sysctl_find(uap-><ref refid="structsysctl__args_1a2653c7c39cf27b5c3d565902797cfb1c" kindref="member">name</ref>,<sp/>uap-><ref refid="structsysctl__args_1abd967f23c35e3af742faa6135f89e79e" kindref="member">namelen</ref>);</highlight></codeline> <codeline lineno="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpCtl<sp/>==<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>CTL\n"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/><<sp/>uap-><ref refid="structsysctl__args_1abd967f23c35e3af742faa6135f89e79e" kindref="member">namelen</ref>;<sp/>i++)</highlight></codeline> <codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"(%i)"</highlight><highlight class="normal">,<sp/>uap-><ref refid="structsysctl__args_1a2653c7c39cf27b5c3d565902797cfb1c" kindref="member">name</ref>[i]);</highlight></codeline> <codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"\n"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="endtask_8h_1a152c1859ada097cc21071f471bfa2e67" kindref="member">endTask</ref>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-><ref refid="structtaskStruct_1a30966587a60db6b40c8be6c387e11d81" kindref="member">id</ref>);</highlight></codeline> <codeline lineno="274"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="275"><highlight class="normal"></highlight></codeline> <codeline lineno="276"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref>)<sp/>uap-><ref refid="structsysctl__args_1ad82c3aba52eb190fc3dbee14eea74c0f" kindref="member">oldlenp</ref><sp/><<sp/>tmpCtl-><ref refid="structsysctl__entry_1abd8a485d90fa0bb76070a23e37c2a6aa" kindref="member">val_len</ref>)</highlight></codeline> <codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(uap-><ref refid="structsysctl__args_1a879406f4741f55713b15ab7590212073" kindref="member">oldp</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref>,<sp/>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<sp/>uap-><ref refid="structsysctl__args_1ad82c3aba52eb190fc3dbee14eea74c0f" kindref="member">oldlenp</ref>);</highlight></codeline> <codeline lineno="278"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(uap-><ref refid="structsysctl__args_1a879406f4741f55713b15ab7590212073" kindref="member">oldp</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1abd8a485d90fa0bb76070a23e37c2a6aa" kindref="member">val_len</ref>);</highlight></codeline> <codeline lineno="280"><highlight class="normal"></highlight></codeline> <codeline lineno="281"><highlight class="normal"><sp/><sp/>td-><ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="282"><highlight class="normal"></highlight></codeline> <codeline lineno="283"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline> <codeline lineno="284"><highlight class="normal">}</highlight></codeline> <codeline lineno="285"><highlight class="normal"></highlight></codeline> <codeline lineno="286" refid="kern__sysctl_8c_1a2ae47a1e2ced5a221aab6fb8aa9d5891" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kern__sysctl_8c_1a2ae47a1e2ced5a221aab6fb8aa9d5891" kindref="member">sys_sysctl</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*td,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsys__sysctl__args" kindref="compound">sys_sysctl_args</ref><sp/>*args)<sp/>{</highlight></codeline> <codeline lineno="287"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*tmpCtl<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="288"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structTrie" kindref="compound">Trie</ref><sp/>*tmpTrie<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="289"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;</highlight></codeline> <codeline lineno="290"><highlight class="normal"></highlight></codeline> <codeline lineno="291"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ctls<sp/>==<sp/>0x0)</highlight></codeline> <codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kpanic_8h_1aa5193288597f00c4f8e3b2939aa6c0ce" kindref="member">K_PANIC</ref>(</highlight><highlight class="stringliteral">"sysctl<sp/>not<sp/>initialized"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="293"><highlight class="normal"></highlight></codeline> <codeline lineno="294"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-><ref refid="structsys__sysctl__args_1ae098e1bc86df9166f40eed6e50b1b67f" kindref="member">newlenp</ref><sp/><<sp/>0)<sp/>{</highlight></codeline> <codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"Changing<sp/>Not<sp/>supported<sp/>yet.\n"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="endtask_8h_1a152c1859ada097cc21071f471bfa2e67" kindref="member">endTask</ref>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-><ref refid="structtaskStruct_1a30966587a60db6b40c8be6c387e11d81" kindref="member">id</ref>);</highlight></codeline> <codeline lineno="297"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="298"><highlight class="normal"></highlight></codeline> <codeline lineno="299"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>-<sp/>Handle<sp/>search<sp/>by<sp/>name<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="300"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-><ref refid="structsys__sysctl__args_1a54834fb64fd2da450757162acfa2e4fc" kindref="member">namelen</ref><sp/>==<sp/>2<sp/>&&<sp/>args-><ref refid="structsys__sysctl__args_1a0d7dbf910117e74bdb090feb14cd8a6a" kindref="member">name</ref>[0]<sp/>==<sp/>0<sp/>&&<sp/>args-><ref refid="structsys__sysctl__args_1a0d7dbf910117e74bdb090feb14cd8a6a" kindref="member">name</ref>[1]<sp/>==<sp/>3)<sp/>{</highlight></codeline> <codeline lineno="301"><highlight class="normal"></highlight></codeline> <codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpTrie<sp/>=<sp/><ref refid="kern__trie_8h_1ad1139bfb80936f02d159c91e28773922" kindref="member">search_trieNode</ref>(<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>args-><ref refid="structsys__sysctl__args_1ade98b50228cebcd01a18a8adb958a75b" kindref="member">newp</ref>);</highlight></codeline> <codeline lineno="303"><highlight class="normal"></highlight></codeline> <codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpTrie<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpCtl<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)tmpTrie-><ref refid="structTrie_1a0d43a2b490ad3501ae54366f674ed726" kindref="member">e</ref>;</highlight></codeline> <codeline lineno="306"><highlight class="normal"></highlight></codeline> <codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf("<FT:<sp/>%s:%i>\n",<sp/>tmpCtl->name,tmpCtl->namelen);</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="308"><highlight class="normal"></highlight></codeline> <codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>tmpCtl<sp/>=<sp/>sysctl_findMib(args->newp,<sp/>args->namelen);</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*args-><ref refid="structsys__sysctl__args_1aba88aea2525265da6aa3ae6bbd258918" kindref="member">oldlenp</ref><sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref><sp/>*4;</highlight></codeline> <codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="include_2sys_2types_8h_1aba29fd78d95cce0ecb249c24b58d07da" kindref="member">u_int32_t</ref><sp/>*oldp<sp/>=<sp/>args-><ref refid="structsys__sysctl__args_1a900d07380291543969160124c750a784" kindref="member">oldp</ref>;</highlight></codeline> <codeline lineno="312"><highlight class="normal"></highlight></codeline> <codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>(i=0;i<tmpCtl-><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>;i++)</highlight></codeline> <codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>oldp[i]<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a0f9f4c47ccc8dfe919f279fbeaab6f20" kindref="member">full_name</ref>[i];</highlight></codeline> <codeline lineno="315"><highlight class="normal"></highlight></codeline> <codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>td-><ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>0;<sp/></highlight><highlight class="comment">/*<sp/>XXX<sp/>-<sp/>Very<sp/>Bad<sp/>need<sp/>to<sp/>store<sp/>namelen<sp/>in<sp/>the<sp/>struct<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="317"><highlight class="normal"></highlight></codeline> <codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);<sp/></highlight></codeline> <codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="321"><highlight class="normal"></highlight></codeline> <codeline lineno="322"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/>#ifdef<sp/>DEBUG_SYSCTL</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"%s:%i>name_to_mib:<sp/>%s\n"</highlight><highlight class="normal">,<sp/>__FILE__,__LINE__,args-><ref refid="structsys__sysctl__args_1ade98b50228cebcd01a18a8adb958a75b" kindref="member">newp</ref>);</highlight></codeline> <codeline lineno="324"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="325"><highlight class="normal"></highlight></codeline> <codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>td-><ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/><ref refid="sys_2errno_8h_1a03e689f378f643d16ea7537918528a48" kindref="member">ENOENT</ref>;</highlight></codeline> <codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(-1);</highlight></codeline> <codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="329"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="330"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl<sp/>=<sp/>sysctl_find(args-><ref refid="structsys__sysctl__args_1a0d7dbf910117e74bdb090feb14cd8a6a" kindref="member">name</ref>,<sp/>args-><ref refid="structsys__sysctl__args_1a54834fb64fd2da450757162acfa2e4fc" kindref="member">namelen</ref>);</highlight></codeline> <codeline lineno="332"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="333"><highlight class="normal"></highlight></codeline> <codeline lineno="334"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpCtl<sp/>==<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>CTL(%i):<sp/>"</highlight><highlight class="normal">,<sp/>args-><ref refid="structsys__sysctl__args_1a54834fb64fd2da450757162acfa2e4fc" kindref="member">namelen</ref>);</highlight></codeline> <codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/><<sp/>args-><ref refid="structsys__sysctl__args_1a54834fb64fd2da450757162acfa2e4fc" kindref="member">namelen</ref>;<sp/>i++)</highlight></codeline> <codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"(%i)"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)<sp/>args-><ref refid="structsys__sysctl__args_1a0d7dbf910117e74bdb090feb14cd8a6a" kindref="member">name</ref>[i]);</highlight></codeline> <codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"\n"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/>td-><ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>-1;</highlight></codeline> <codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline> <codeline lineno="341"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="342"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline> <codeline lineno="343"><highlight class="comment"><sp/><sp/>else<sp/>{</highlight></codeline> <codeline lineno="344"><highlight class="comment"><sp/><sp/><sp/><sp/>kprintf("Valid<sp/>CTL(%i):<sp/>",<sp/>args->namelen);</highlight></codeline> <codeline lineno="345"><highlight class="comment"><sp/><sp/><sp/><sp/>for<sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/><<sp/>args->namelen;<sp/>i++)</highlight></codeline> <codeline lineno="346"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>kprintf("(%i)",<sp/>(int)<sp/>args->name[i]);</highlight></codeline> <codeline lineno="347"><highlight class="comment"><sp/><sp/><sp/><sp/>kprintf("\n");</highlight></codeline> <codeline lineno="348"><highlight class="comment"><sp/><sp/>}</highlight></codeline> <codeline lineno="349"><highlight class="comment"></highlight></codeline> <codeline lineno="350"><highlight class="comment"><sp/><sp/>kprintf("{%i:%i}\n",args->oldlenp,<sp/>tmpCtl->val_len);</highlight></codeline> <codeline lineno="351"><highlight class="comment"></highlight></codeline> <codeline lineno="352"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="353"><highlight class="normal"></highlight></codeline> <codeline lineno="354"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref>)<sp/>args-><ref refid="structsys__sysctl__args_1aba88aea2525265da6aa3ae6bbd258918" kindref="member">oldlenp</ref><sp/><<sp/>tmpCtl-><ref refid="structsysctl__entry_1abd8a485d90fa0bb76070a23e37c2a6aa" kindref="member">val_len</ref>)</highlight></codeline> <codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(args-><ref refid="structsys__sysctl__args_1a900d07380291543969160124c750a784" kindref="member">oldp</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref>,<sp/>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<sp/>args-><ref refid="structsys__sysctl__args_1aba88aea2525265da6aa3ae6bbd258918" kindref="member">oldlenp</ref>);</highlight></codeline> <codeline lineno="356"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(args-><ref refid="structsys__sysctl__args_1a900d07380291543969160124c750a784" kindref="member">oldp</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1abd8a485d90fa0bb76070a23e37c2a6aa" kindref="member">val_len</ref>);</highlight></codeline> <codeline lineno="358"><highlight class="normal"></highlight></codeline> <codeline lineno="359"><highlight class="normal"><sp/><sp/>td-><ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="360"><highlight class="normal"></highlight></codeline> <codeline lineno="361"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline> <codeline lineno="362"><highlight class="normal">}</highlight></codeline> <codeline lineno="363"><highlight class="normal"></highlight></codeline> <codeline lineno="364"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*sysctl_find(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>)<sp/>{</highlight></codeline> <codeline lineno="365"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="366"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*tmpCtl<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="367"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*lCtl<sp/>=<sp/>ctls;</highlight></codeline> <codeline lineno="368"><highlight class="normal"></highlight></codeline> <codeline lineno="369"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Loop<sp/>Name<sp/>Len<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="370"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/><<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>;<sp/>i++)<sp/>{</highlight></codeline> <codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpCtl<sp/>=<sp/>lCtl;<sp/>tmpCtl<sp/>!=<sp/>0x0;<sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>)<sp/>{</highlight></codeline> <codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf("ctlName:<sp/>[%s],<sp/>ctlId;<sp/>[%i]\n",tmpCtl->name,tmpCtl->id);</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>==<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[i])<sp/>{</highlight></codeline> <codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((i<sp/>+<sp/>1)<sp/>==<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>)<sp/>{</highlight></codeline> <codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpCtl);</highlight></codeline> <codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>;</highlight></codeline> <codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="381"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="382"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline> <codeline lineno="383"><highlight class="normal">}</highlight></codeline> <codeline lineno="384"><highlight class="normal"></highlight></codeline> <codeline lineno="385"><highlight class="normal"></highlight></codeline> <codeline lineno="386"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*sysctl_findMib(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>)<sp/>{</highlight></codeline> <codeline lineno="387"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="388"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*tmpCtl<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="389"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*lCtl<sp/>=<sp/>ctls;</highlight></codeline> <codeline lineno="390"><highlight class="normal"></highlight></codeline> <codeline lineno="391"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*mib<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">"."</highlight><highlight class="normal"><sp/>);</highlight></codeline> <codeline lineno="392"><highlight class="normal"></highlight></codeline> <codeline lineno="393"><highlight class="normal"></highlight></codeline> <codeline lineno="394"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"FMIB:<sp/>%s"</highlight><highlight class="normal">,<sp/>mib);</highlight></codeline> <codeline lineno="395"><highlight class="normal"></highlight></codeline> <codeline lineno="396"><highlight class="normal"><sp/><sp/>lCtl<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kern__trie_8h_1ad1139bfb80936f02d159c91e28773922" kindref="member">search_trieNode</ref>(<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>mib)-><ref refid="structTrie_1a0d43a2b490ad3501ae54366f674ed726" kindref="member">e</ref>;</highlight></codeline> <codeline lineno="397"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"FT:<sp/>%s"</highlight><highlight class="normal">,<sp/>lCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>);</highlight></codeline> <codeline lineno="398"><highlight class="normal"></highlight></codeline> <codeline lineno="399"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Loop<sp/>Name<sp/>Len<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="400"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/><<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>;<sp/>i++)<sp/>{</highlight></codeline> <codeline lineno="401"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpCtl<sp/>=<sp/>lCtl;<sp/>tmpCtl<sp/>!=<sp/>0x0;<sp/>tmpCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref>)<sp/>{</highlight></codeline> <codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="string_8h_1a6f3dcb20ff11ff9db5904c3cfb61a38c" kindref="member">strcmp</ref>(mib,<sp/>tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"ctlName:<sp/>[%s],<sp/>ctlId:<sp/>[%i]"</highlight><highlight class="normal">,tmpCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,tmpCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref>);</highlight></codeline> <codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((i<sp/>+<sp/>1)<sp/>==<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>)<sp/>{</highlight></codeline> <codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpCtl);</highlight></codeline> <codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mib<sp/>=<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="stringliteral">"\n"</highlight><highlight class="normal"><sp/>);</highlight></codeline> <codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"SMIB:<sp/>%s"</highlight><highlight class="normal">,<sp/>mib);</highlight></codeline> <codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lCtl<sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>;</highlight></codeline> <codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="412"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="413"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="414"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline> <codeline lineno="415"><highlight class="normal">}</highlight></codeline> <codeline lineno="416"><highlight class="normal"></highlight></codeline> <codeline lineno="417"><highlight class="normal"></highlight></codeline> <codeline lineno="418" refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="kern__sysctl_8c_1a2a55d33778f8774747841f23f4ff9f1f" kindref="member">sysctl_add</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*str_name,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>buf_size)<sp/>{</highlight></codeline> <codeline lineno="419"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*tmpCtl<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="420"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*newCtl<sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="421"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;</highlight></codeline> <codeline lineno="422"><highlight class="normal"></highlight></codeline> <codeline lineno="423"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Check<sp/>if<sp/>it<sp/>exists<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="424"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>sysctl_find(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>);</highlight></codeline> <codeline lineno="425"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpCtl<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"Node<sp/>Exists!<sp/>[%s]\n"</highlight><highlight class="normal">,<sp/>str_name);</highlight></codeline> <codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(1)</highlight></codeline> <codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline> <codeline lineno="429"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="430"><highlight class="normal"></highlight></codeline> <codeline lineno="431"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>Parent<sp/>Node<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="432"><highlight class="normal"><sp/><sp/>tmpCtl<sp/>=<sp/>sysctl_find(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref><sp/>-<sp/>1);</highlight></codeline> <codeline lineno="433"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpCtl<sp/>==<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"Parent<sp/>Node<sp/>Non<sp/>Existant\n"</highlight><highlight class="normal">);</highlight></codeline> <codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline> <codeline lineno="436"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="437"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline> <codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>,<sp/>0x0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[<ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref><sp/>-<sp/>1];</highlight></codeline> <codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/><<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>;i++)</highlight></codeline> <codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a0f9f4c47ccc8dfe919f279fbeaab6f20" kindref="member">full_name</ref>[i]<sp/>=<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[i];</highlight></codeline> <codeline lineno="446"><highlight class="normal"></highlight></codeline> <codeline lineno="447"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref><sp/>=<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>;</highlight></codeline> <codeline lineno="448"><highlight class="normal"></highlight></codeline> <codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>str_name);</highlight></codeline> <codeline lineno="450"><highlight class="normal"></highlight></codeline> <codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>);</highlight></codeline> <codeline lineno="452"><highlight class="normal"></highlight></codeline> <codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(buf_size);</highlight></codeline> <codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref>,<sp/><ref refid="structbuf" kindref="compound">buf</ref>,<sp/>buf_size);</highlight></codeline> <codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1abd8a485d90fa0bb76070a23e37c2a6aa" kindref="member">val_len</ref><sp/>=<sp/>buf_size;</highlight></codeline> <codeline lineno="456"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="457"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(newCtl,<sp/>0x0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsysctl__entry" kindref="compound">sysctl_entry</ref>));</highlight></codeline> <codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1a7fe5c9ce75d56acee42c432e3e00321f" kindref="member">next</ref><sp/>=<sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>;</highlight></codeline> <codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>0x0;</highlight></codeline> <codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1aa59204308c5d65c292b5e76280dc4e2c" kindref="member">id</ref><sp/>=<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[<ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref><sp/>-<sp/>1];</highlight></codeline> <codeline lineno="464"><highlight class="normal"></highlight></codeline> <codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<<ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>;i++)</highlight></codeline> <codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1a0f9f4c47ccc8dfe919f279fbeaab6f20" kindref="member">full_name</ref>[i]<sp/>=<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[i];</highlight></codeline> <codeline lineno="467"><highlight class="normal"></highlight></codeline> <codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref><sp/>=<sp/><ref refid="structsysctl__entry_1a0d730bca6ca3fbb9053d04696512f502" kindref="member">namelen</ref>;</highlight></codeline> <codeline lineno="469"><highlight class="normal"></highlight></codeline> <codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(newCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>str_name);</highlight></codeline> <codeline lineno="471"><highlight class="normal"></highlight></codeline> <codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kern__trie_8h_1a63f3fe8b4181d1c5de41d1444f4fde7d" kindref="member">insert_trieNode</ref>(&<ref refid="kern__sysctl_8c_1aee088e4ab334f0991904c1a1ea773ffd" kindref="member">sysctl_headTrie</ref>,<sp/>newCtl-><ref refid="structsysctl__entry_1a0209092e0d9a6dc9da8c5e072c30e9c8" kindref="member">name</ref>,<sp/>newCtl);</highlight></codeline> <codeline lineno="473"><highlight class="normal"></highlight></codeline> <codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(buf_size);</highlight></codeline> <codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(newCtl-><ref refid="structsysctl__entry_1affd915637490eb2ec4674c4a13894a1a" kindref="member">value</ref>,<sp/><ref refid="structbuf" kindref="compound">buf</ref>,<sp/>buf_size);</highlight></codeline> <codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/>newCtl-><ref refid="structsysctl__entry_1abd8a485d90fa0bb76070a23e37c2a6aa" kindref="member">val_len</ref><sp/>=<sp/>buf_size;</highlight></codeline> <codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref>-><ref refid="structsysctl__entry_1a0e2e6c2769d6f630bcb94a51af41d132" kindref="member">prev</ref><sp/>=<sp/>newCtl;</highlight></codeline> <codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpCtl-><ref refid="structsysctl__entry_1a239c611e035660fc8f16883c74cdffdc" kindref="member">children</ref><sp/>=<sp/>newCtl;</highlight></codeline> <codeline lineno="479"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="480"><highlight class="normal"></highlight></codeline> <codeline lineno="481"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline> <codeline lineno="482"><highlight class="normal">}</highlight></codeline> <codeline lineno="483"><highlight class="normal"></highlight></codeline> <codeline lineno="484"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline> <codeline lineno="485"><highlight class="comment"><sp/>END</highlight></codeline> <codeline lineno="486"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline> </programlisting> <location file="C:/Dev/git/UbixOS/sys/kernel/kern_sysctl.c"/> </compounddef> </doxygen>