<?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="file_8c" kind="file" language="C++">
    <compoundname>file.c</compoundname>
    <includes refid="sched_8h" local="no">ubixos/sched.h</includes>
    <includes refid="include_2vfs_2vfs_8h" local="no">vfs/vfs.h</includes>
    <includes refid="vitals_8h" local="no">ubixos/vitals.h</includes>
    <includes refid="kpanic_8h" local="no">ubixos/kpanic.h</includes>
    <includes refid="spinlock_8h" local="no">ubixos/spinlock.h</includes>
    <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="paging_8h" local="no">vmm/paging.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="assert_8h" local="no">assert.h</includes>
    <includes refid="descrip_8h" local="no">sys/descrip.h</includes>
    <incdepgraph>
      <node id="60">
        <label>sys/fcntl.h</label>
        <link refid="fcntl_8h"/>
      </node>
      <node id="21">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="58">
        <label>sys/descrip.h</label>
        <link refid="descrip_8h"/>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="59" relation="include">
        </childnode>
        <childnode refid="60" relation="include">
        </childnode>
      </node>
      <node id="38">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="39">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="25">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="36">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="45">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>net/net.h</label>
        <link refid="net_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/fs/vfs/file.c</label>
        <link refid="file_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
        <childnode refid="51" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="54" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
        <childnode refid="58" relation="include">
        </childnode>
      </node>
      <node id="55">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="50">
        <label>net/priv/memp_priv.h</label>
        <link refid="memp__priv_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="56">
        <label>vmm/paging.h</label>
        <link refid="paging_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="52">
        <label>ubixos/spinlock.h</label>
        <link refid="spinlock_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="34">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="35" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="51">
        <label>ubixos/vitals.h</label>
        <link refid="vitals_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
      </node>
      <node id="53">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="47">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
      </node>
      <node id="46">
        <label>net/stats.h</label>
        <link refid="stats_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>vfs/vfs.h</label>
        <link refid="include_2vfs_2vfs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="23">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="4" 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="54">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="42">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="33" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
      </node>
      <node id="33">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="57">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="15">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="19">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="18">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="44">
        <label>net/ip6_addr.h</label>
        <link refid="ip6__addr_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
      </node>
      <node id="30">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="32" relation="include">
        </childnode>
      </node>
      <node id="37">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
      </node>
      <node id="32">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="33" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
      </node>
      <node id="43">
        <label>net/ip4_addr.h</label>
        <link refid="ip4__addr_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
      </node>
      <node id="41">
        <label>net/ip_addr.h</label>
        <link refid="ip__addr_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="49">
        <label>net/priv/memp_std.h</label>
        <link refid="memp__std_8h"/>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="35">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="40">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="33" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="22">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>sys/sysproto_posix.h</label>
        <link refid="sysproto__posix_8h"/>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="59">
        <label>vfs/stat.h</label>
        <link refid="stat_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="48">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="var">
      <memberdef kind="variable" id="file_8c_1acc7848731c780c8a5c224413af7e9a68" prot="public" static="no" mutable="no">
        <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
        <definition>fileDescriptor_t* fdTable</definition>
        <argsstring></argsstring>
        <name>fdTable</name>
        <initializer>= 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="43" column="18" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="file_8c_1a5ff3fda6450e9507e3a549617db04f7b" prot="public" static="yes" mutable="no">
        <type>struct <ref refid="structspinLock" kindref="compound">spinLock</ref></type>
        <definition>struct spinLock fdTable_lock</definition>
        <argsstring></argsstring>
        <name>fdTable_lock</name>
        <initializer>= <ref refid="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref></initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="313" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="41" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="file_8c_1a09e62893d79bde83aab854950d41b941" prot="public" static="no" mutable="no">
        <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
        <definition>fileDescriptor_t* vfs_fileTable</definition>
        <argsstring></argsstring>
        <name>vfs_fileTable</name>
        <initializer>= 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="45" column="18" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="45" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="file_8c_1a62ac32695420234cb7ccbcfc6cabd4a4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fclose</definition>
        <argsstring>(fileDescriptor_t *fd)</argsstring>
        <name>fclose</name>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="526" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="526" bodyend="566"/>
        <references refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" compoundref="descrip_8h" startline="71">file::fd</references>
        <references refid="armv6_2spinlock_8c_1a71f03d2ba55111c715b6068254847a53" compoundref="armv6_2spinlock_8c" startline="55" endline="61">spinLock</references>
        <referencedby refid="stat_8c_1a450c63b2bbf7f46c54846f2b8a565587" compoundref="stat_8c" startline="36" endline="89">_sys_stat</referencedby>
        <referencedby refid="descrip_8c_1a266f2b3582c66190ca585589f2938065" compoundref="descrip_8c" startline="348" endline="375">dup2</referencedby>
        <referencedby refid="kernel_2elf_8c_1aaf5f82fbbff76c71fcefe513c40730b4" compoundref="kernel_2elf_8c" startline="37" endline="137">elf_load_file</referencedby>
        <referencedby refid="exec_8c_1af80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="153" endline="330">execFile</referencedby>
        <referencedby refid="descrip_8c_1aa825d15d1f3691b7e31917e05ef9f3bc" compoundref="descrip_8c" startline="40" endline="90">fcntl</referencedby>
        <referencedby refid="kmod_8c_1a92b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="70" endline="207">kmod_load</referencedby>
        <referencedby refid="ld_8c_1add6ca1fb619f0bc0f4addffbfc5577a7" compoundref="ld_8c" startline="40" endline="194">ldEnable</referencedby>
        <referencedby refid="vfs__calls_8c_1a3195389ea302c069fc2dbf8a08e4c841" compoundref="vfs__calls_8c" startline="99" endline="149">sys_close</referencedby>
        <referencedby refid="sysproto__posix_8h_1ad487c345cae976c0d0c52ee482ec17cd" compoundref="file_8c" startline="277" endline="287">sys_fclose</referencedby>
        <referencedby refid="sysproto__posix_8h_1a45d0ab2fb556f121f5478022d847fdd1" compoundref="stat_8c" startline="133" endline="180">sys_fstatat</referencedby>
        <referencedby refid="exec_8c_1a219681612352232186a0f568457d851d" compoundref="exec_8c" startline="340" endline="545">sysExec</referencedby>
        <referencedby refid="file_8c_1a81e426f86ee3d066c32986948fe3f6fd" compoundref="file_8c" startline="576" endline="609">sysMkDir</referencedby>
        <referencedby refid="systemtask_8h_1ac7cc6a806237f8657fcdce169319fd7f" compoundref="armv6_2systemtask_8c" startline="47" endline="117">systemTask</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1aac3b8b18e3c19492e533d385cae01f3a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int feof</definition>
        <argsstring>(fileDescriptor_t *fd)</argsstring>
        <name>feof</name>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="337" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="337" bodyend="342"/>
        <references refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" compoundref="descrip_8h" startline="71">file::fd</references>
        <references refid="include_2vfs_2vfs_8h_1a4907ecb6121af1b80c5c5b436ebe3cb5" compoundref="include_2vfs_2vfs_8h" startline="47">fdEof</references>
        <references refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" compoundref="include_2vfs_2file_8h" startline="67">fileDescriptor::status</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1af3ae9aab3fa1a25c0b0cde40aa97f2d0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fgetc</definition>
        <argsstring>(fileDescriptor_t *fd)</argsstring>
        <name>fgetc</name>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="366" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="366" bodyend="377"/>
        <references refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" compoundref="descrip_8h" startline="71">file::fd</references>
        <references refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="69">vfs_mountPoint::fs</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" compoundref="include_2vfs_2file_8h" startline="69">fileDescriptor::offset</references>
        <references refid="structfileSystem_1a0ae6c56aba90970c49df0fe24d82c864" compoundref="include_2vfs_2vfs_8h" startline="63">fileSystem::vfsRead</references>
        <referencedby refid="sysproto__posix_8h_1a635e457cca04f0435b1b25d0d6b987df" compoundref="file_8c" startline="76" endline="113">sys_fgetc</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a249f3bc0af043dc5ac3c9aa8646986af" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
        <definition>fileDescriptor_t* fopen</definition>
        <argsstring>(const char *file, const char *flags)</argsstring>
        <name>fopen</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>file</declname>
        </param>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>flags</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="388" column="18" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="388" bodyend="518"/>
        <references refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" compoundref="armv6_2sched_8c" startline="50">_current</references>
        <references refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" compoundref="include_2vfs_2file_8h" startline="74">fileDescriptor::buffer</references>
        <references refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" compoundref="sched_8h" startline="58">osInfo::cwd</references>
        <references refid="tcpdump_8c_1a03d2d7be521e9d357862075078d24f06" compoundref="tcpdump_8c" startline="45">file</references>
        <references refid="include_2vfs_2vfs_8h_1ae4c27d5653358d16438504434867dfff" compoundref="include_2vfs_2vfs_8h" startline="52">fileAppend</references>
        <references refid="include_2vfs_2vfs_8h_1a3e8798b0a6e30da29349c1b6d827f52a" compoundref="include_2vfs_2vfs_8h" startline="51">fileBinary</references>
        <references refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" compoundref="include_2vfs_2file_8h" startline="73">fileDescriptor::fileName</references>
        <references refid="include_2vfs_2vfs_8h_1ae8e814536103f514b8460ec7a0fc4553" compoundref="include_2vfs_2vfs_8h" startline="49">fileRead</references>
        <references refid="include_2vfs_2vfs_8h_1a4898b5a1a1daebda9d11b4afde062e5c" compoundref="include_2vfs_2vfs_8h" startline="50">fileWrite</references>
        <references refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="69">vfs_mountPoint::fs</references>
        <references refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" compoundref="kmalloc_8c" startline="342" endline="382">kfree</references>
        <references refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" compoundref="kmalloc_8c" startline="241" endline="331">kmalloc</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="string_8h_1ace4b911463887af5e748326323e99a23">memset</references>
        <references refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" compoundref="include_2vfs_2file_8h" startline="68">fileDescriptor::mode</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" compoundref="sched_8h" startline="69">taskStruct::oInfo</references>
        <references refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" compoundref="armv6_2spinlock_8c" startline="36" endline="45">spinUnlock</references>
        <references refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="278" endline="286">sprintf</references>
        <references refid="string_8h_1a55e123beb3d7f96e25e024a13582d987">strcpy</references>
        <references refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2">strstr</references>
        <references refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" compoundref="strtok_8c" startline="76" endline="79">strtok</references>
        <references refid="mount_8c_1aa8cc926aa9badb781158b6738b1b0f2d" compoundref="mount_8c" startline="128" endline="138">vfs_findMount</references>
        <references refid="structfileSystem_1af2816f106f39d0355faf5689d92a9b8b" compoundref="include_2vfs_2vfs_8h" startline="65">fileSystem::vfsOpenFile</references>
        <referencedby refid="stat_8c_1a450c63b2bbf7f46c54846f2b8a565587" compoundref="stat_8c" startline="36" endline="89">_sys_stat</referencedby>
        <referencedby refid="kernel_2elf_8c_1aaf5f82fbbff76c71fcefe513c40730b4" compoundref="kernel_2elf_8c" startline="37" endline="137">elf_load_file</referencedby>
        <referencedby refid="exec_8c_1af80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="153" endline="330">execFile</referencedby>
        <referencedby refid="vfs__calls_8c_1ab35b14c33a5b03f7617b58b4c0667bd4" compoundref="vfs__calls_8c" startline="399" endline="448">kern_openat</referencedby>
        <referencedby refid="kmod_8c_1a92b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="70" endline="207">kmod_load</referencedby>
        <referencedby refid="ld_8c_1add6ca1fb619f0bc0f4addffbfc5577a7" compoundref="ld_8c" startline="40" endline="194">ldEnable</referencedby>
        <referencedby refid="sysproto__posix_8h_1a8cc1e5a71a073900a358fb3f0ec343cd" compoundref="file_8c" startline="237" endline="250">sys_fopen</referencedby>
        <referencedby refid="sysproto__posix_8h_1a45d0ab2fb556f121f5478022d847fdd1" compoundref="stat_8c" startline="133" endline="180">sys_fstatat</referencedby>
        <referencedby refid="vfs__calls_8c_1a61bacda2680307d7f33cd2efe52ba2b5" compoundref="vfs__calls_8c" startline="45" endline="97">sys_openat</referencedby>
        <referencedby refid="sysproto__posix_8h_1a6194ac39a3ce5a21050d2a9a3117b433" compoundref="stat_8c" startline="239" endline="294">sys_statfs</referencedby>
        <referencedby refid="exec_8c_1a219681612352232186a0f568457d851d" compoundref="exec_8c" startline="340" endline="545">sysExec</referencedby>
        <referencedby refid="file_8c_1a81e426f86ee3d066c32986948fe3f6fd" compoundref="file_8c" startline="576" endline="609">sysMkDir</referencedby>
        <referencedby refid="tcpdump_8c_1a5a1493a11fbda3bb015f788583dfd3e4" compoundref="tcpdump_8c" startline="47" endline="55">tcpdump_init</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1aeedf75b4010ae4e12e9743744a3b20f0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fputc</definition>
        <argsstring>(int ch, fileDescriptor_t *fd)</argsstring>
        <name>fputc</name>
        <param>
          <type>int</type>
          <declname>ch</declname>
        </param>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="350" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="350" bodyend="358"/>
        <references refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" compoundref="descrip_8h" startline="71">file::fd</references>
        <references refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="69">vfs_mountPoint::fs</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" compoundref="include_2vfs_2file_8h" startline="69">fileDescriptor::offset</references>
        <references refid="structfileSystem_1adcbc968dbf271d2fbdf1b3e75e5b5685" compoundref="include_2vfs_2vfs_8h" startline="64">fileSystem::vfsWrite</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1ac539f57edd90fcd088fd3baa10319166" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2sys_2types_8h_1a7619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
        <definition>size_t fread</definition>
        <argsstring>(void *ptr, size_t size, size_t nmemb, fileDescriptor_t *fd)</argsstring>
        <name>fread</name>
        <param>
          <type>void *</type>
          <declname>ptr</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a7619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
          <declname>size</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a7619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
          <declname>nmemb</declname>
        </param>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="291" column="8" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="291" bodyend="309"/>
        <references refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" compoundref="descrip_8h" startline="71">file::fd</references>
        <references refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="69">vfs_mountPoint::fs</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" compoundref="include_2vfs_2file_8h" startline="69">fileDescriptor::offset</references>
        <references refid="structfileSystem_1a0ae6c56aba90970c49df0fe24d82c864" compoundref="include_2vfs_2vfs_8h" startline="63">fileSystem::vfsRead</references>
        <referencedby refid="kernel_2elf_8c_1aaf5f82fbbff76c71fcefe513c40730b4" compoundref="kernel_2elf_8c" startline="37" endline="137">elf_load_file</referencedby>
        <referencedby refid="exec_8c_1af80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="153" endline="330">execFile</referencedby>
        <referencedby refid="kmod_8c_1a92b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="70" endline="207">kmod_load</referencedby>
        <referencedby refid="ld_8c_1add6ca1fb619f0bc0f4addffbfc5577a7" compoundref="ld_8c" startline="40" endline="194">ldEnable</referencedby>
        <referencedby refid="gen__calls_8c_1a5eff3a25d417fafce7c4f211db219ca2" compoundref="gen__calls_8c" startline="100" endline="119">read</referencedby>
        <referencedby refid="sysproto__posix_8h_1acf06a7573eb2427ca5649b5df99a48d4" compoundref="file_8c" startline="258" endline="269">sys_fread</referencedby>
        <referencedby refid="vfs__calls_8c_1aec77dd1139b0a36d6aa7b29d08039bc1" compoundref="vfs__calls_8c" startline="373" endline="387">sys_getdirentries</referencedby>
        <referencedby refid="vmm__mmap_8c_1a34f95e2ffa8a4bb4ca88918a3a3af580" compoundref="vmm__mmap_8c" startline="162" endline="220">sys_mmap</referencedby>
        <referencedby refid="vfs__calls_8c_1a883455624440fedf2b1af73d313e0ade" compoundref="vfs__calls_8c" startline="239" endline="291">sys_pread</referencedby>
        <referencedby refid="vfs__calls_8c_1a7678726e58a6393050f3b26e0b9b3152" compoundref="vfs__calls_8c" startline="151" endline="237">sys_read</referencedby>
        <referencedby refid="exec_8c_1a219681612352232186a0f568457d851d" compoundref="exec_8c" startline="340" endline="545">sysExec</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1aac4e345a7fcee61422a6b35b54f22def" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fseek</definition>
        <argsstring>(fileDescriptor_t *tmpFd, long offset, int whence)</argsstring>
        <name>fseek</name>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>tmpFd</declname>
        </param>
        <param>
          <type>long</type>
          <declname>offset</declname>
        </param>
        <param>
          <type>int</type>
          <declname>whence</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="326" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="326" bodyend="329"/>
        <referencedby refid="kernel_2elf_8c_1aaf5f82fbbff76c71fcefe513c40730b4" compoundref="kernel_2elf_8c" startline="37" endline="137">elf_load_file</referencedby>
        <referencedby refid="exec_8c_1af80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="153" endline="330">execFile</referencedby>
        <referencedby refid="kmod_8c_1a92b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="70" endline="207">kmod_load</referencedby>
        <referencedby refid="ld_8c_1add6ca1fb619f0bc0f4addffbfc5577a7" compoundref="ld_8c" startline="40" endline="194">ldEnable</referencedby>
        <referencedby refid="vmm__mmap_8c_1a34f95e2ffa8a4bb4ca88918a3a3af580" compoundref="vmm__mmap_8c" startline="162" endline="220">sys_mmap</referencedby>
        <referencedby refid="exec_8c_1a219681612352232186a0f568457d851d" compoundref="exec_8c" startline="340" endline="545">sysExec</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a803ecb7dac37bee57ef3fe11c7899d36" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2sys_2types_8h_1a7619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
        <definition>size_t fwrite</definition>
        <argsstring>(void *ptr, int size, int nmemb, fileDescriptor_t *fd)</argsstring>
        <name>fwrite</name>
        <param>
          <type>void *</type>
          <declname>ptr</declname>
        </param>
        <param>
          <type>int</type>
          <declname>size</declname>
        </param>
        <param>
          <type>int</type>
          <declname>nmemb</declname>
        </param>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="311" column="8" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="311" bodyend="324"/>
        <referencedby refid="include_2vfs_2file_8h_1a6b6b8f061ddd1e9631f0858ff0d83ff0" compoundref="file_8c" startline="47" endline="62">sys_fwrite</referencedby>
        <referencedby refid="vfs__calls_8c_1a159495d16f0ec154193733ad4fb1fc71" compoundref="vfs__calls_8c" startline="293" endline="364">sys_write</referencedby>
        <referencedby refid="file_8c_1a1a17e9753f6c9d2b34c35a2b2e7d240e" compoundref="file_8c" startline="66" endline="74">sysFwrite</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a291abf9e4a4c13bf52334f8b70ed89c4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_chdir</definition>
        <argsstring>(struct thread *td, struct sys_chdir_args *args)</argsstring>
        <name>sys_chdir</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__chdir__args" kindref="compound">sys_chdir_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="186" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="186" bodyend="195"/>
        <references refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" compoundref="armv6_2sched_8c" startline="50">_current</references>
        <references refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" compoundref="sched_8h" startline="58">osInfo::cwd</references>
        <references refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" compoundref="sched_8h" startline="69">taskStruct::oInfo</references>
        <references refid="structsys__chdir__args_1a929adef40df7b5009d65e5ef266069f4" compoundref="sysproto__posix_8h" startline="128">sys_chdir_args::path</references>
        <references refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="278" endline="286">sprintf</references>
        <references refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2">strstr</references>
        <references refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="41">thread::td_retval</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1aacb366423b61090b6713b0bf4b1fd7a1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_fchdir</definition>
        <argsstring>(struct thread *td, struct sys_fchdir_args *args)</argsstring>
        <name>sys_fchdir</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__fchdir__args" kindref="compound">sys_fchdir_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="197" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="197" bodyend="218"/>
        <references refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" compoundref="armv6_2sched_8c" startline="50">_current</references>
        <references refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" compoundref="sched_8h" startline="58">osInfo::cwd</references>
        <references refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" compoundref="descrip_8h" startline="71">file::fd</references>
        <references refid="structsys__fchdir__args_1a8832ea0c58b7db905393910bebbeb6b3" compoundref="sysproto__posix_8h" startline="622">sys_fchdir_args::fd</references>
        <references refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" compoundref="include_2vfs_2file_8h" startline="73">fileDescriptor::fileName</references>
        <references refid="descrip_8h_1a14e228d6e5391a882d3b20ff2466b2ac" compoundref="descrip_8c" startline="214" endline="227">getfd</references>
        <references refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" compoundref="sched_8h" startline="69">taskStruct::oInfo</references>
        <references refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="278" endline="286">sprintf</references>
        <references refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2">strstr</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a70191cfd6769c66c6d06b164dcdbc17f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_fclose</definition>
        <argsstring>(struct thread *td, struct sys_fclose_args *args)</argsstring>
        <name>sys_fclose</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__fclose__args" kindref="compound">sys_fclose_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="277" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="277" bodyend="287"/>
        <references refid="file_8c_1a62ac32695420234cb7ccbcfc6cabd4a4" compoundref="file_8c" startline="526" endline="566">fclose</references>
        <references refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" compoundref="include_2vfs_2file_8h" startline="87">userFileDescriptorStruct::fd</references>
        <references refid="structsys__fclose__args_1a8d5f3be92a8acd8e81bc9699f436a57d" compoundref="sysproto__posix_8h" startline="195">sys_fclose_args::FILE</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1abb61ebfb43c853943e7e05235d80ed01" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_fgetc</definition>
        <argsstring>(struct thread *td, struct sys_fgetc_args *args)</argsstring>
        <name>sys_fgetc</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__fgetc__args" kindref="compound">sys_fgetc_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="76" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="76" bodyend="113"/>
        <references refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" compoundref="armv6_2sched_8c" startline="50">_current</references>
        <references refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" compoundref="include_2vfs_2file_8h" startline="87">userFileDescriptorStruct::fd</references>
        <references refid="file_8c_1af3ae9aab3fa1a25c0b0cde40aa97f2d0" compoundref="file_8c" startline="366" endline="377">fgetc</references>
        <references refid="structsys__fgetc__args_1a131dd2c64a10c4f8610c0f491ec973ff" compoundref="sysproto__posix_8h" startline="201">sys_fgetc_args::FILE</references>
        <references refid="include_2vfs_2file_8h_1ac45fdeab51c3197c1e7c4ec7beabaca9" compoundref="atkbd_8c" startline="346" endline="393">getchar</references>
        <references refid="armv6_2sched_8c_1a08933fe6d593a1c78b9080359f15a0b7" compoundref="armv6_2sched_8c" startline="244" endline="246">sched_yield</references>
        <references refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="41">thread::td_retval</references>
        <references refid="structtaskStruct_1a4563a310626d4f4ea885f4532356abb3" compoundref="sched_8h" startline="77">taskStruct::term</references>
        <references refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" compoundref="tty_8c" startline="38">tty_foreground</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a3be521720a454a77765244b4c72c3bbb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_fopen</definition>
        <argsstring>(struct thread *td, struct sys_fopen_args *args)</argsstring>
        <name>sys_fopen</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__fopen__args" kindref="compound">sys_fopen_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="237" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="237" bodyend="250"/>
        <references refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" compoundref="include_2vfs_2file_8h" startline="87">userFileDescriptorStruct::fd</references>
        <references refid="structuserFileDescriptorStruct_1add64fe63c4301a984814b07aa54ea8ba" compoundref="include_2vfs_2file_8h" startline="88">userFileDescriptorStruct::fdSize</references>
        <references refid="structsys__fopen__args_1a00e28c4fc64e5470f73f8cea9b3c15d1" compoundref="sysproto__posix_8h" startline="174">sys_fopen_args::FILE</references>
        <references refid="file_8c_1a249f3bc0af043dc5ac3c9aa8646986af" compoundref="file_8c" startline="388" endline="518">fopen</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structsys__fopen__args_1aeb38d8920ca6e4881c8bfacd0f23ea2c" compoundref="sysproto__posix_8h" startline="171">sys_fopen_args::mode</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structsys__fopen__args_1a307ed115afac7c1a1dd70f7aba9b3e8d" compoundref="sysproto__posix_8h" startline="168">sys_fopen_args::path</references>
        <references refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" compoundref="include_2vfs_2file_8h" startline="70">fileDescriptor::size</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a545f03b28b5716fbe15ce9659ceb6d90" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_fread</definition>
        <argsstring>(struct thread *td, struct sys_fread_args *args)</argsstring>
        <name>sys_fread</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__fread__args" kindref="compound">sys_fread_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="258" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="258" bodyend="269"/>
        <references refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" compoundref="include_2vfs_2file_8h" startline="87">userFileDescriptorStruct::fd</references>
        <references refid="structsys__fread__args_1a742427e61146581d4db89b0314234a47" compoundref="sysproto__posix_8h" startline="189">sys_fread_args::FILE</references>
        <references refid="file_8c_1ac539f57edd90fcd088fd3baa10319166" compoundref="file_8c" startline="291" endline="309">fread</references>
        <references refid="structsys__fread__args_1a1dfb42511929f0f81ea35f4c28cdf800" compoundref="sysproto__posix_8h" startline="186">sys_fread_args::nmemb</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structsys__fread__args_1aeef83cd85aa1a40afeecd9ad70b5690f" compoundref="sysproto__posix_8h" startline="180">sys_fread_args::ptr</references>
        <references refid="structsys__fread__args_1ae88453ffe19ed6161315d3a0adff92cb" compoundref="sysproto__posix_8h" startline="183">sys_fread_args::size</references>
        <references refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="41">thread::td_retval</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1ae325931441d5a2a5799cfc3b3b565ea5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_fseek</definition>
        <argsstring>(struct thread *td, struct sys_fseek_args *args)</argsstring>
        <name>sys_fseek</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__fseek__args" kindref="compound">sys_fseek_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="119" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="119" bodyend="147"/>
        <references refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" compoundref="include_2vfs_2file_8h" startline="87">userFileDescriptorStruct::fd</references>
        <references refid="structsys__fseek__args_1a3236d8edf7cfa3ed26538d78b81c35b4" compoundref="sysproto__posix_8h" startline="207">sys_fseek_args::FILE</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" compoundref="include_2vfs_2file_8h" startline="69">fileDescriptor::offset</references>
        <references refid="structsys__fseek__args_1a5c34883a0246e9f5ae6e6081e2ba34c8" compoundref="sysproto__posix_8h" startline="210">sys_fseek_args::offset</references>
        <references refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="41">thread::td_retval</references>
        <references refid="structsys__fseek__args_1a1e6d47db55778b198c0cad3d9a1a37ec" compoundref="sysproto__posix_8h" startline="213">sys_fseek_args::whence</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a09b738cc798b6031b843553e9ecab54e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_fwrite</definition>
        <argsstring>(struct thread *td, struct sys_fwrite_args *uap)</argsstring>
        <name>sys_fwrite</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__fwrite__args" kindref="compound">sys_fwrite_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="47" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="47" bodyend="62"/>
        <references refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" compoundref="armv6_2sched_8c" startline="50">_current</references>
        <references refid="structsys__fwrite__args_1a09d7b567e170336ef0de963190d239f3" compoundref="include_2vfs_2file_8h" startline="98">sys_fwrite_args::buf</references>
        <references refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" compoundref="include_2vfs_2file_8h" startline="87">userFileDescriptorStruct::fd</references>
        <references refid="structsys__fwrite__args_1a1bb3fb28765aec4e58715ff5a1c61783" compoundref="include_2vfs_2file_8h" startline="101">sys_fwrite_args::fd</references>
        <references refid="file_8c_1a803ecb7dac37bee57ef3fe11c7899d36" compoundref="file_8c" startline="311" endline="324">fwrite</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structsys__fwrite__args_1a28c2058a67eaa959fcd1267c7c304bc4" compoundref="include_2vfs_2file_8h" startline="99">sys_fwrite_args::nbytes</references>
        <references refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="41">thread::td_retval</references>
        <references refid="structtaskStruct_1a4563a310626d4f4ea885f4532356abb3" compoundref="sched_8h" startline="77">taskStruct::term</references>
        <references refid="tty_8h_1ad96f57a7c113d3cfa76ee5fed6de33c0" compoundref="tty_8c" startline="115" endline="165">tty_print</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1ade0b74e887087f04856c55aebaa9f2e5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_lseek</definition>
        <argsstring>(struct thread *td, struct sys_lseek_args *args)</argsstring>
        <name>sys_lseek</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__lseek__args" kindref="compound">sys_lseek_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="149" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="149" bodyend="184"/>
        <references refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" compoundref="descrip_8h" startline="71">file::fd</references>
        <references refid="structsys__lseek__args_1abd7ef624fc7752d6e6b3a3cf91c17f78" compoundref="sysproto__posix_8h" startline="219">sys_lseek_args::fd</references>
        <references refid="descrip_8h_1a14e228d6e5391a882d3b20ff2466b2ac" compoundref="descrip_8c" startline="214" endline="227">getfd</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" compoundref="include_2vfs_2file_8h" startline="69">fileDescriptor::offset</references>
        <references refid="structsys__lseek__args_1a93b5ee48d6df13a8698a0042ff10f28b" compoundref="sysproto__posix_8h" startline="222">sys_lseek_args::offset</references>
        <references refid="fat__filelib_8h_1a4c8d0b76b470ba65a43ca46a88320f39" compoundref="fat__filelib_8h" startline="12">SEEK_CUR</references>
        <references refid="fat__filelib_8h_1a0d112bae8fd35be772185b6ec6bcbe64" compoundref="fat__filelib_8h" startline="20">SEEK_SET</references>
        <references refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="41">thread::td_retval</references>
        <references refid="structsys__lseek__args_1ae5e2cb3ac951cb20efbb68057eedcea2" compoundref="sysproto__posix_8h" startline="225">sys_lseek_args::whence</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a6d4fd27c5c2e07c9d631d0e7cd3d9b6c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_rename</definition>
        <argsstring>(struct thread *td, struct sys_rename_args *args)</argsstring>
        <name>sys_rename</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsys__rename__args" kindref="compound">sys_rename_args</ref> *</type>
          <declname>args</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="220" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="220" bodyend="223"/>
        <references refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="41">thread::td_retval</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a1a17e9753f6c9d2b34c35a2b2e7d240e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysFwrite</definition>
        <argsstring>(char *ptr, int size, userFileDescriptor *userFd)</argsstring>
        <name>sysFwrite</name>
        <param>
          <type>char *</type>
          <declname>ptr</declname>
        </param>
        <param>
          <type>int</type>
          <declname>size</declname>
        </param>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1a22ca9900413e251296c9d17911cb24f5" kindref="member">userFileDescriptor</ref> *</type>
          <declname>userFd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="66" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="66" bodyend="74"/>
        <references refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" compoundref="armv6_2sched_8c" startline="50">_current</references>
        <references refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" compoundref="include_2vfs_2file_8h" startline="87">userFileDescriptorStruct::fd</references>
        <references refid="file_8c_1a803ecb7dac37bee57ef3fe11c7899d36" compoundref="file_8c" startline="311" endline="324">fwrite</references>
        <references refid="structtaskStruct_1a4563a310626d4f4ea885f4532356abb3" compoundref="sched_8h" startline="77">taskStruct::term</references>
        <references refid="tty_8h_1ad96f57a7c113d3cfa76ee5fed6de33c0" compoundref="tty_8c" startline="115" endline="165">tty_print</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a81e426f86ee3d066c32986948fe3f6fd" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysMkDir</definition>
        <argsstring>(const char *path)</argsstring>
        <name>sysMkDir</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>path</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="576" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="576" bodyend="609"/>
        <references refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" compoundref="armv6_2sched_8c" startline="50">_current</references>
        <references refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" compoundref="sched_8h" startline="58">osInfo::cwd</references>
        <references refid="file_8c_1a62ac32695420234cb7ccbcfc6cabd4a4" compoundref="file_8c" startline="526" endline="566">fclose</references>
        <references refid="file_8c_1a249f3bc0af043dc5ac3c9aa8646986af" compoundref="file_8c" startline="388" endline="518">fopen</references>
        <references refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="69">vfs_mountPoint::fs</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" compoundref="sched_8h" startline="69">taskStruct::oInfo</references>
        <references refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="278" endline="286">sprintf</references>
        <references refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2">strstr</references>
        <references refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" compoundref="strtok_8c" startline="76" endline="79">strtok</references>
        <references refid="structfileSystem_1a4cd903f29e242ecc35938b91d43c4ba5" compoundref="include_2vfs_2vfs_8h" startline="67">fileSystem::vfsMakeDir</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a6db05e27ce2d54b4d2b5202c2d4282df" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysRmDir</definition>
        <argsstring>()</argsstring>
        <name>sysRmDir</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="115" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="115" bodyend="117"/>
      </memberdef>
      <memberdef kind="function" id="file_8c_1a2cd9f983c9c2595c1126e6618a762526" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sysUnlink</definition>
        <argsstring>(const char *path, int *retVal)</argsstring>
        <name>sysUnlink</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>path</declname>
        </param>
        <param>
          <type>int *</type>
          <declname>retVal</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="225" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="225" bodyend="228"/>
      </memberdef>
      <memberdef kind="function" id="file_8c_1ada4d877b19c34ce3137e0c35dab6e947" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int unlink</definition>
        <argsstring>(const char *node)</argsstring>
        <name>unlink</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>node</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" line="618" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/vfs/file.c" bodystart="618" bodyend="636"/>
      </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/>&quot;AS<sp/>IS&quot;<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/>&lt;<ref refid="sched_8h" kindref="compound">ubixos/sched.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="include_2vfs_2vfs_8h" kindref="compound">vfs/vfs.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="vitals_8h" kindref="compound">ubixos/vitals.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kpanic_8h" kindref="compound">ubixos/kpanic.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="spinlock_8h" kindref="compound">ubixos/spinlock.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kmalloc_8h" kindref="compound">lib/kmalloc.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="string_8h" kindref="compound">string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="paging_8h" kindref="compound">vmm/paging.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="assert_8h" kindref="compound">assert.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="descrip_8h" kindref="compound">sys/descrip.h</ref>&gt;</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="structspinLock" kindref="compound">spinLock</ref><sp/>fdTable_lock<sp/>=<sp/><ref refid="spinlock_8h_1a0fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref>;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43" refid="include_2vfs_2file_8h_1acc7848731c780c8a5c224413af7e9a68" refkind="member"><highlight class="normal"><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="45" refid="file_8c_1a09e62893d79bde83aab854950d41b941" refkind="member"><highlight class="normal"><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="file_8c_1a09e62893d79bde83aab854950d41b941" kindref="member">vfs_fileTable</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47" refid="include_2vfs_2file_8h_1a6b6b8f061ddd1e9631f0858ff0d83ff0" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a09b738cc798b6031b843553e9ecab54e" kindref="member">sys_fwrite</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__fwrite__args" kindref="compound">sys_fwrite_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*t<sp/>=<sp/>uap-&gt;<ref refid="structsys__fwrite__args_1a09d7b567e170336ef0de963190d239f3" kindref="member">buf</ref>;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uap-&gt;<ref refid="structsys__fwrite__args_1a1bb3fb28765aec4e58715ff5a1c61783" kindref="member">fd</ref><sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="tty_8h_1ad96f57a7c113d3cfa76ee5fed6de33c0" kindref="member">tty_print</ref>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>uap-&gt;<ref refid="structsys__fwrite__args_1a09d7b567e170336ef0de963190d239f3" kindref="member">buf</ref>,<sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a4563a310626d4f4ea885f4532356abb3" kindref="member">term</ref>);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>DEBUG_VFS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;uap-&gt;size:<sp/>%i,<sp/>FD:<sp/>[0x%X],<sp/>BUF:<sp/>[0x%X][%c]\n&quot;</highlight><highlight class="normal">,<sp/>uap-&gt;<ref refid="structsys__fwrite__args_1a28c2058a67eaa959fcd1267c7c304bc4" kindref="member">nbytes</ref>,<sp/>uap-&gt;<ref refid="structsys__fwrite__args_1a1bb3fb28765aec4e58715ff5a1c61783" kindref="member">fd</ref>,<sp/>uap-&gt;<ref refid="structsys__fwrite__args_1a09d7b567e170336ef0de963190d239f3" kindref="member">buf</ref>,<sp/>t[0]);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="file_8c_1a803ecb7dac37bee57ef3fe11c7899d36" kindref="member">fwrite</ref>(uap-&gt;<ref refid="structsys__fwrite__args_1a09d7b567e170336ef0de963190d239f3" kindref="member">buf</ref>,<sp/>uap-&gt;<ref refid="structsys__fwrite__args_1a28c2058a67eaa959fcd1267c7c304bc4" kindref="member">nbytes</ref>,<sp/>1,<sp/>uap-&gt;<ref refid="structsys__fwrite__args_1a1bb3fb28765aec4e58715ff5a1c61783" kindref="member">fd</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="62"><highlight class="normal">}</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>USER<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
<codeline lineno="66" refid="file_8c_1a1a17e9753f6c9d2b34c35a2b2e7d240e" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a1a17e9753f6c9d2b34c35a2b2e7d240e" kindref="member">sysFwrite</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*ptr,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>size,<sp/><ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref><sp/>*userFd)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="tty_8h_1ad96f57a7c113d3cfa76ee5fed6de33c0" kindref="member">tty_print</ref>(ptr,<sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a4563a310626d4f4ea885f4532356abb3" kindref="member">term</ref>);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="file_8c_1a803ecb7dac37bee57ef3fe11c7899d36" kindref="member">fwrite</ref>(ptr,<sp/>size,<sp/>1,<sp/>userFd-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="74"><highlight class="normal">}</highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76" refid="sysproto__posix_8h_1a635e457cca04f0435b1b25d0d6b987df" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1abb61ebfb43c853943e7e05235d80ed01" kindref="member">sys_fgetc</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__fgetc__args" kindref="compound">sys_fgetc_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>c;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fgetc__args_1a131dd2c64a10c4f8610c0f491ec973ff" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(1)<sp/>{</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a4563a310626d4f4ea885f4532356abb3" kindref="member">term</ref><sp/>==<sp/><ref refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" kindref="member">tty_foreground</ref>)<sp/>{</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>c<sp/>=<sp/><ref refid="include_2vfs_2file_8h_1ac45fdeab51c3197c1e7c4ec7beabaca9" kindref="member">getchar</ref>();</highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(c<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>c;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="armv6_2sched_8c_1a08933fe6d593a1c78b9080359f15a0b7" kindref="member">sched_yield</ref>();</highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="armv6_2sched_8c_1a08933fe6d593a1c78b9080359f15a0b7" kindref="member">sched_yield</ref>();</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="98"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>else<sp/>{</highlight></codeline>
<codeline lineno="99"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>kprintf(&quot;Waking<sp/>Task:<sp/>%i\n&quot;,tty_foreground-&gt;owner);</highlight></codeline>
<codeline lineno="100"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sched_setStatus(tty_foreground-&gt;owner,READY);</highlight></codeline>
<codeline lineno="101"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>kprintf(&quot;Sleeping<sp/>Task:<sp/>%i\n&quot;,_current-&gt;id);</highlight></codeline>
<codeline lineno="102"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sched_setStatus(_current-&gt;id,WAIT);</highlight></codeline>
<codeline lineno="103"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sched_yield();</highlight></codeline>
<codeline lineno="104"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="105"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/>c<sp/>=<sp/><ref refid="file_8c_1af3ae9aab3fa1a25c0b0cde40aa97f2d0" kindref="member">fgetc</ref>(args-&gt;<ref refid="structsys__fgetc__args_1a131dd2c64a10c4f8610c0f491ec973ff" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>c;</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="113"><highlight class="normal">}</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115" refid="syscalls_8h_1a8f4f96a1b41076561eed24755be468b1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a6db05e27ce2d54b4d2b5202c2d4282df" kindref="member">sysRmDir</ref>()<sp/>{</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="117"><highlight class="normal">}</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119" refid="sysproto__posix_8h_1a0b68b7964a860aa2c5acacf5a7d486e6" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1ae325931441d5a2a5799cfc3b3b565ea5" kindref="member">sys_fseek</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__fseek__args" kindref="compound">sys_fseek_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;offset:<sp/>%ld,<sp/>whence:<sp/>0x%X&quot;</highlight><highlight class="normal">,<sp/>args-&gt;<ref refid="structsys__fseek__args_1a5c34883a0246e9f5ae6e6081e2ba34c8" kindref="member">offset</ref>,<sp/>args-&gt;<ref refid="structsys__fseek__args_1a1e6d47db55778b198c0cad3d9a1a37ec" kindref="member">whence</ref>);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO<sp/>:<sp/>coredump?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fseek__args_1a3236d8edf7cfa3ed26538d78b81c35b4" kindref="member">FILE</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fseek__args_1a3236d8edf7cfa3ed26538d78b81c35b4" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fseek__args_1a1e6d47db55778b198c0cad3d9a1a37ec" kindref="member">whence</ref>)<sp/>{</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>0:</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>args-&gt;<ref refid="structsys__fseek__args_1a3236d8edf7cfa3ed26538d78b81c35b4" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>args-&gt;<ref refid="structsys__fseek__args_1a5c34883a0246e9f5ae6e6081e2ba34c8" kindref="member">offset</ref><sp/>+<sp/>args-&gt;<ref refid="structsys__fseek__args_1a1e6d47db55778b198c0cad3d9a1a37ec" kindref="member">whence</ref>;</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>1:</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>args-&gt;<ref refid="structsys__fseek__args_1a3236d8edf7cfa3ed26538d78b81c35b4" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>+=<sp/>args-&gt;<ref refid="structsys__fseek__args_1a5c34883a0246e9f5ae6e6081e2ba34c8" kindref="member">offset</ref>;</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;seek-whence:<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>args-&gt;<ref refid="structsys__fseek__args_1a1e6d47db55778b198c0cad3d9a1a37ec" kindref="member">whence</ref>);</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>args-&gt;<ref refid="structsys__fseek__args_1a3236d8edf7cfa3ed26538d78b81c35b4" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>&amp;<sp/>0xFFFFFFFF;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="147"><highlight class="normal">}</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight></codeline>
<codeline lineno="149" refid="sysproto__posix_8h_1a22d7ac2731d375722cb6fcfaa8b35996" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1ade0b74e887087f04856c55aebaa9f2e5" kindref="member">sys_lseek</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__lseek__args" kindref="compound">sys_lseek_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>error<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfile" kindref="compound">file</ref><sp/>*fdd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="153"><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><ref refid="descrip_8h_1a14e228d6e5391a882d3b20ff2466b2ac" kindref="member">getfd</ref>(td,<sp/>&amp;fdd,<sp/>args-&gt;<ref refid="structsys__lseek__args_1abd7ef624fc7752d6e6b3a3cf91c17f78" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>=<sp/>fdd-&gt;<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fdd<sp/>==<sp/>0<sp/>||<sp/>fdd-&gt;<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>error<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;ERROR!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="162"><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;loffset(%i):<sp/>%i:%i,<sp/>whence:<sp/>0x%X&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="include_2sys_2types_8h_1afa178be408981cc5edd64227b6332fc6" kindref="member">off_t</ref>),<sp/>args-&gt;<ref refid="structsys__lseek__args_1a93b5ee48d6df13a8698a0042ff10f28b" kindref="member">offset</ref><sp/>&gt;&gt;<sp/>32,<sp/>args-&gt;<ref refid="structsys__lseek__args_1a93b5ee48d6df13a8698a0042ff10f28b" kindref="member">offset</ref><sp/>&amp;<sp/>0xFFFFFF,<sp/>args-&gt;<ref refid="structsys__lseek__args_1ae5e2cb3ac951cb20efbb68057eedcea2" kindref="member">whence</ref>);</highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__lseek__args_1ae5e2cb3ac951cb20efbb68057eedcea2" kindref="member">whence</ref>)<sp/>{</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="fat__filelib_8h_1a0d112bae8fd35be772185b6ec6bcbe64" kindref="member">SEEK_SET</ref>:</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>args-&gt;<ref refid="structsys__lseek__args_1a93b5ee48d6df13a8698a0042ff10f28b" kindref="member">offset</ref>;</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>&amp;<sp/>0xFFFFFFFF;</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[1]<sp/>=<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>&gt;&gt;<sp/>32;</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="fat__filelib_8h_1a4c8d0b76b470ba65a43ca46a88320f39" kindref="member">SEEK_CUR</ref>:</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>+=<sp/>args-&gt;<ref refid="structsys__lseek__args_1a93b5ee48d6df13a8698a0042ff10f28b" kindref="member">offset</ref>;</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>&amp;<sp/>0xFFFFFFFF;</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[1]<sp/>=<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>&gt;&gt;<sp/>32;</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;seek-whence:<sp/>%i&quot;</highlight><highlight class="normal">,<sp/>args-&gt;<ref refid="structsys__lseek__args_1ae5e2cb3ac951cb20efbb68057eedcea2" kindref="member">whence</ref>);</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;loff:<sp/>%ld&quot;</highlight><highlight class="normal">,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>);</highlight></codeline>
<codeline lineno="182"><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(error);</highlight></codeline>
<codeline lineno="184"><highlight class="normal">}</highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight></codeline>
<codeline lineno="186" refid="sysproto__posix_8h_1a2eb9cc767595f53b3c580cd534a0a890" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a291abf9e4a4c13bf52334f8b70ed89c4" kindref="member">sys_chdir</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__chdir__args" kindref="compound">sys_chdir_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(args-&gt;<ref refid="structsys__chdir__args_1a929adef40df7b5009d65e5ef266069f4" kindref="member">path</ref>,<sp/></highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<sp/></highlight><highlight class="stringliteral">&quot;%s%s&quot;</highlight><highlight class="normal">,<sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<sp/>args-&gt;<ref refid="structsys__chdir__args_1a929adef40df7b5009d65e5ef266069f4" kindref="member">path</ref>);</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<sp/>args-&gt;<ref refid="structsys__chdir__args_1a929adef40df7b5009d65e5ef266069f4" kindref="member">path</ref>);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="195"><highlight class="normal">}</highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight></codeline>
<codeline lineno="197" refid="sysproto__posix_8h_1a5ad4ab96ec36d0f1763b9540edaf0128" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1aacb366423b61090b6713b0bf4b1fd7a1" kindref="member">sys_fchdir</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__fchdir__args" kindref="compound">sys_fchdir_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>error<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfile" kindref="compound">file</ref><sp/>*fdd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="201"><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><ref refid="descrip_8h_1a14e228d6e5391a882d3b20ff2466b2ac" kindref="member">getfd</ref>(td,<sp/>&amp;fdd,<sp/>args-&gt;<ref refid="structsys__fchdir__args_1a8832ea0c58b7db905393910bebbeb6b3" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>=<sp/>fdd-&gt;<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>;</highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fdd<sp/>==<sp/>0<sp/>||<sp/>fdd-&gt;<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>error<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>,<sp/></highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<sp/></highlight><highlight class="stringliteral">&quot;%s%s&quot;</highlight><highlight class="normal">,<sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>);</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>);</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(error);</highlight></codeline>
<codeline lineno="218"><highlight class="normal">}</highlight></codeline>
<codeline lineno="219"><highlight class="normal"></highlight></codeline>
<codeline lineno="220" refid="sysproto__posix_8h_1a460135dd17a4894e163f59465c88c502" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a6d4fd27c5c2e07c9d631d0e7cd3d9b6c" kindref="member">sys_rename</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__rename__args" kindref="compound">sys_rename_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="223"><highlight class="normal">}</highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight></codeline>
<codeline lineno="225" refid="file_8c_1a2cd9f983c9c2595c1126e6618a762526" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a2cd9f983c9c2595c1126e6618a762526" kindref="member">sysUnlink</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*path,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*retVal)<sp/>{</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/>*retVal<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(*retVal);</highlight></codeline>
<codeline lineno="228"><highlight class="normal">}</highlight></codeline>
<codeline lineno="229"><highlight class="normal"></highlight></codeline>
<codeline lineno="230"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="231"><highlight class="comment"></highlight></codeline>
<codeline lineno="232"><highlight class="comment"><sp/>Function:<sp/>void<sp/>sysFopen();</highlight></codeline>
<codeline lineno="233"><highlight class="comment"><sp/>Description:<sp/>Opens<sp/>A<sp/>File<sp/>Descriptor<sp/>For<sp/>A<sp/>User<sp/>Task</highlight></codeline>
<codeline lineno="234"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="235"><highlight class="comment"></highlight></codeline>
<codeline lineno="236"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="237" refid="sysproto__posix_8h_1a8cc1e5a71a073900a358fb3f0ec343cd" refkind="member"><highlight class="normal"></highlight><highlight class="comment">//void<sp/>sysFopen(const<sp/>char<sp/>*file,char<sp/>*flags,userFileDescriptor<sp/>*userFd)<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a3be521720a454a77765244b4c72c3bbb" kindref="member">sys_fopen</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__fopen__args" kindref="compound">sys_fopen_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;sys_fopen&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fopen__args_1a00e28c4fc64e5470f73f8cea9b3c15d1" kindref="member">FILE</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Error:<sp/>userFd<sp/>==<sp/>NULL,<sp/>File:<sp/>%s,<sp/>Line:<sp/>%i\n&quot;</highlight><highlight class="normal">,<sp/>__FILE__,<sp/>__LINE__);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="244"><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/>args-&gt;<ref refid="structsys__fopen__args_1a00e28c4fc64e5470f73f8cea9b3c15d1" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref><sp/>=<sp/><ref refid="file_8c_1a249f3bc0af043dc5ac3c9aa8646986af" kindref="member">fopen</ref>(args-&gt;<ref refid="structsys__fopen__args_1a307ed115afac7c1a1dd70f7aba9b3e8d" kindref="member">path</ref>,<sp/>args-&gt;<ref refid="structsys__fopen__args_1aeb38d8920ca6e4881c8bfacd0f23ea2c" kindref="member">mode</ref>);</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fopen__args_1a00e28c4fc64e5470f73f8cea9b3c15d1" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref><sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/>args-&gt;<ref refid="structsys__fopen__args_1a00e28c4fc64e5470f73f8cea9b3c15d1" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1add64fe63c4301a984814b07aa54ea8ba" kindref="member">fdSize</ref><sp/>=<sp/>args-&gt;<ref refid="structsys__fopen__args_1a00e28c4fc64e5470f73f8cea9b3c15d1" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref>;</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="251"><highlight class="normal">}</highlight></codeline>
<codeline lineno="252"><highlight class="normal"></highlight></codeline>
<codeline lineno="253"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="254"><highlight class="comment"></highlight></codeline>
<codeline lineno="255"><highlight class="comment"><sp/>Function:<sp/>void<sp/>sysFread();</highlight></codeline>
<codeline lineno="256"><highlight class="comment"><sp/>Description:<sp/>Reads<sp/>SIZE<sp/>Bytes<sp/>From<sp/>The<sp/>userFd<sp/>Into<sp/>DATA</highlight></codeline>
<codeline lineno="257"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="258" refid="sysproto__posix_8h_1acf06a7573eb2427ca5649b5df99a48d4" refkind="member"><highlight class="comment"></highlight></codeline>
<codeline lineno="259"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a545f03b28b5716fbe15ce9659ceb6d90" kindref="member">sys_fread</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__fread__args" kindref="compound">sys_fread_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="261"><highlight class="normal"></highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>TODO<sp/>:<sp/>coredump?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fread__args_1a742427e61146581d4db89b0314234a47" kindref="member">FILE</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fread__args_1a742427e61146581d4db89b0314234a47" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="268"><highlight class="normal"></highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/>td-&gt;<ref refid="structthread_1af3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/><ref refid="file_8c_1ac539f57edd90fcd088fd3baa10319166" kindref="member">fread</ref>(args-&gt;<ref refid="structsys__fread__args_1aeef83cd85aa1a40afeecd9ad70b5690f" kindref="member">ptr</ref>,<sp/>args-&gt;<ref refid="structsys__fread__args_1ae88453ffe19ed6161315d3a0adff92cb" kindref="member">size</ref>,<sp/>args-&gt;<ref refid="structsys__fread__args_1a1dfb42511929f0f81ea35f4c28cdf800" kindref="member">nmemb</ref>,<sp/>args-&gt;<ref refid="structsys__fread__args_1a742427e61146581d4db89b0314234a47" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="271"><highlight class="normal">}</highlight></codeline>
<codeline lineno="272"><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="274"><highlight class="comment"></highlight></codeline>
<codeline lineno="275"><highlight class="comment"><sp/>Function:<sp/>void<sp/>sysFclse();</highlight></codeline>
<codeline lineno="276"><highlight class="comment"><sp/>Description:<sp/>Closes<sp/>A<sp/>File<sp/>Descriptor<sp/>For<sp/>A<sp/>User<sp/>Task</highlight></codeline>
<codeline lineno="277" refid="sysproto__posix_8h_1ad487c345cae976c0d0c52ee482ec17cd" refkind="member"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="278"><highlight class="comment"></highlight></codeline>
<codeline lineno="279"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a70191cfd6769c66c6d06b164dcdbc17f" kindref="member">sys_fclose</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__fclose__args" kindref="compound">sys_fclose_args</ref><sp/>*args)<sp/>{</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fclose__args_1a8d5f3be92a8acd8e81bc9699f436a57d" kindref="member">FILE</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(args-&gt;<ref refid="structsys__fclose__args_1a8d5f3be92a8acd8e81bc9699f436a57d" kindref="member">FILE</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="287"><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="file_8c_1a62ac32695420234cb7ccbcfc6cabd4a4" kindref="member">fclose</ref>(args-&gt;<ref refid="structsys__fclose__args_1a8d5f3be92a8acd8e81bc9699f436a57d" kindref="member">FILE</ref>-&gt;<ref refid="structuserFileDescriptorStruct_1a6109b48f13922b89603bf1b47fa9d7ae" kindref="member">fd</ref>));</highlight></codeline>
<codeline lineno="290"><highlight class="normal">}</highlight></codeline>
<codeline lineno="291" refid="include_2vfs_2file_8h_1ac539f57edd90fcd088fd3baa10319166" refkind="member"><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>KERNEL<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"></highlight></codeline>
<codeline lineno="294"><highlight class="normal"></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="file_8c_1ac539f57edd90fcd088fd3baa10319166" kindref="member">fread</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ptr,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>size,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>nmemb,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>)<sp/>{</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"></highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="299"><highlight class="normal"></highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(nmemb<sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/>nmemb<sp/>=<sp/>1;<sp/></highlight><highlight class="comment">//Temp<sp/>Fix</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="302"><highlight class="normal"></highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>);</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>);</highlight></codeline>
<codeline lineno="306"><highlight class="normal"></highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/>i<sp/>=<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1a0ae6c56aba90970c49df0fe24d82c864" kindref="member">vfsRead</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>,<sp/>ptr,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>,<sp/>size<sp/>*<sp/>nmemb);</highlight></codeline>
<codeline lineno="308"><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//fd-&gt;offset<sp/>+=<sp/>size<sp/>*<sp/>nmemb;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="310"><highlight class="normal"></highlight></codeline>
<codeline lineno="311" refid="include_2vfs_2file_8h_1a803ecb7dac37bee57ef3fe11c7899d36" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(i);</highlight></codeline>
<codeline lineno="312"><highlight class="normal">}</highlight></codeline>
<codeline lineno="313"><highlight class="normal"></highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a803ecb7dac37bee57ef3fe11c7899d36" kindref="member">fwrite</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ptr,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>size,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nmemb,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>)<sp/>{</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>res<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="317"><highlight class="comment"><sp/><sp/>kprintf(&quot;fd[0x%X]\m&quot;,<sp/>fd);</highlight></codeline>
<codeline lineno="318"><highlight class="comment"><sp/><sp/>kprintf(&quot;fd-&gt;mp[0x%X]\m&quot;,<sp/>fd-&gt;mp);</highlight></codeline>
<codeline lineno="319"><highlight class="comment"><sp/><sp/>kprintf(&quot;fd-&gt;mp-&gt;fs[0x%X]\m&quot;,<sp/>fd-&gt;mp-&gt;fs);</highlight></codeline>
<codeline lineno="320"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="321"><highlight class="normal"></highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/>res<sp/>=<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1adcbc968dbf271d2fbdf1b3e75e5b5685" kindref="member">vfsWrite</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>,<sp/>ptr,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>,<sp/>size<sp/>*<sp/>nmemb);</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>+=<sp/>size<sp/>*<sp/>nmemb;</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="326" refid="include_2vfs_2file_8h_1a54d3349303e4078c21c0f956047b8250" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(res);</highlight></codeline>
<codeline lineno="327"><highlight class="normal">}</highlight></codeline>
<codeline lineno="328"><highlight class="normal"></highlight></codeline>
<codeline lineno="329"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1aac4e345a7fcee61422a6b35b54f22def" kindref="member">fseek</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*tmpFd,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>offset,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>whence)<sp/>{</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>offset<sp/>+<sp/>whence;</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>);</highlight></codeline>
<codeline lineno="332"><highlight class="normal">}</highlight></codeline>
<codeline lineno="333"><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="335"><highlight class="comment"></highlight></codeline>
<codeline lineno="336"><highlight class="comment"><sp/>Function:<sp/>int<sp/>feof(fileDescriptor_t<sp/>*fd)</highlight></codeline>
<codeline lineno="337" refid="include_2vfs_2file_8h_1aac3b8b18e3c19492e533d385cae01f3a" refkind="member"><highlight class="comment"><sp/>Description:<sp/>Check<sp/>A<sp/>File<sp/>Descriptor<sp/>For<sp/>EOF<sp/>And<sp/>Return<sp/>Result</highlight></codeline>
<codeline lineno="338"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="339"><highlight class="comment"></highlight></codeline>
<codeline lineno="340"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="341"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1aac3b8b18e3c19492e533d385cae01f3a" kindref="member">feof</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>)<sp/>{</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" kindref="member">status</ref><sp/>==<sp/><ref refid="include_2vfs_2vfs_8h_1a4907ecb6121af1b80c5c5b436ebe3cb5" kindref="member">fdEof</ref>)<sp/>{</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="346"><highlight class="normal">}</highlight></codeline>
<codeline lineno="347"><highlight class="normal"></highlight></codeline>
<codeline lineno="348"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="349"><highlight class="comment"></highlight></codeline>
<codeline lineno="350" refid="file_8c_1aeedf75b4010ae4e12e9743744a3b20f0" refkind="member"><highlight class="comment"><sp/>Function:<sp/>int<sp/>fputc(int<sp/>ch,fileDescriptor_t<sp/>*fd)</highlight></codeline>
<codeline lineno="351"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Will<sp/>Write<sp/>Character<sp/>To<sp/>FD</highlight></codeline>
<codeline lineno="352"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="353"><highlight class="comment"></highlight></codeline>
<codeline lineno="354"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="355"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1aeedf75b4010ae4e12e9743744a3b20f0" kindref="member">fputc</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ch,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>)<sp/>{</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/>ch<sp/>=<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1adcbc968dbf271d2fbdf1b3e75e5b5685" kindref="member">vfsWrite</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>,<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>ch,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>,<sp/>1);</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>++;</highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(ch);</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>NULL<sp/>If<sp/>FD<sp/>Is<sp/>Not<sp/>Found<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="363"><highlight class="normal">}</highlight></codeline>
<codeline lineno="364"><highlight class="normal"></highlight></codeline>
<codeline lineno="365"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="366" refid="include_2vfs_2file_8h_1af3ae9aab3fa1a25c0b0cde40aa97f2d0" refkind="member"><highlight class="comment"></highlight></codeline>
<codeline lineno="367"><highlight class="comment"><sp/>Function:<sp/>int<sp/>fgetc(fileDescriptor_T<sp/>*fd)</highlight></codeline>
<codeline lineno="368"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Will<sp/>Return<sp/>The<sp/>Next<sp/>Character<sp/>In<sp/>A<sp/>FD<sp/>Stream</highlight></codeline>
<codeline lineno="369"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="370"><highlight class="comment"></highlight></codeline>
<codeline lineno="371"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1af3ae9aab3fa1a25c0b0cde40aa97f2d0" kindref="member">fgetc</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>)<sp/>{</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ch<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>Found<sp/>Return<sp/>Next<sp/>Char<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1a0ae6c56aba90970c49df0fe24d82c864" kindref="member">vfsRead</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>,<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>&amp;ch,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>,<sp/>1);</highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>++;</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(ch);</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="380"><highlight class="normal"></highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>NULL<sp/>If<sp/>FD<sp/>Is<sp/>Not<sp/>Found<sp/>*/</highlight><highlight class="normal"></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><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="386"><highlight class="comment"></highlight></codeline>
<codeline lineno="387"><highlight class="comment"><sp/>Function:<sp/>fileDescriptor_t<sp/>*fopen(const<sp/>char<sp/>*file,cont<sp/>char<sp/>*flags)</highlight></codeline>
<codeline lineno="388" refid="include_2vfs_2file_8h_1aa5a3a3f92ecea1381616825ba8646306" refkind="member"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Will<sp/>Open<sp/>A<sp/>File<sp/>And<sp/>Return<sp/>A<sp/>File<sp/>Descriptor</highlight></codeline>
<codeline lineno="389"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="390"><highlight class="comment"></highlight></codeline>
<codeline lineno="391"><highlight class="comment"><sp/>08/05/02<sp/>-<sp/>Just<sp/>Started<sp/>A<sp/>Rewrite<sp/>Of<sp/>This<sp/>Function<sp/>Should<sp/>Work<sp/>Out<sp/>Well</highlight></codeline>
<codeline lineno="392"><highlight class="comment"></highlight></codeline>
<codeline lineno="393"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="394"><highlight class="normal"></highlight></codeline>
<codeline lineno="395"><highlight class="normal"><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref>*<sp/><ref refid="file_8c_1a249f3bc0af043dc5ac3c9aa8646986af" kindref="member">fopen</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="structfile" kindref="compound">file</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*flags)<sp/>{</highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*path<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*mountPoint<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>fileName[1024];</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*tmpFd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="402"><highlight class="normal"></highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Allocate<sp/>Memory<sp/>For<sp/>File<sp/>Descriptor<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((tmpFd<sp/>=<sp/>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref>)))<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Error:<sp/>tmpFd<sp/>==<sp/>NULL,<sp/>File:<sp/>%s,<sp/>Line:<sp/>%i\n&quot;</highlight><highlight class="normal">,<sp/>__FILE__,<sp/>__LINE__);</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="408"><highlight class="normal"></highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(tmpFd,<sp/>0x0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref>));</highlight></codeline>
<codeline lineno="410"><highlight class="normal"></highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/>path<sp/>=<sp/><ref refid="tcpdump_8c_1a03d2d7be521e9d357862075078d24f06" kindref="member">file</ref>;</highlight></codeline>
<codeline lineno="412"><highlight class="normal"></highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Determine<sp/>if<sp/>path<sp/>is<sp/>relative<sp/>or<sp/>absolute<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(path[0]<sp/>==<sp/></highlight><highlight class="stringliteral">&quot;.&quot;</highlight><highlight class="normal"><sp/>&amp;&amp;<sp/>path[1]<sp/>==<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1a55e123beb3d7f96e25e024a13582d987" kindref="member">strcpy</ref>(fileName,<sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>);</highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1a55e123beb3d7f96e25e024a13582d987" kindref="member">strcpy</ref>(fileName,<sp/><ref refid="structfile" kindref="compound">file</ref>);</highlight></codeline>
<codeline lineno="418"><highlight class="normal"></highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/>path<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="420"><highlight class="normal"></highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(fileName,<sp/></highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/>mountPoint<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>&amp;fileName,<sp/></highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/><sp/><sp/>path<sp/>=<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/>path<sp/>=<sp/>fileName;</highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="428"><highlight class="normal"></highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(path[0]<sp/>==<sp/></highlight><highlight class="charliteral">&apos;/&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1a55e123beb3d7f96e25e024a13582d987" kindref="member">strcpy</ref>(tmpFd-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>,<sp/>path);</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpFd-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>,<sp/></highlight><highlight class="stringliteral">&quot;/%s&quot;</highlight><highlight class="normal">,<sp/>path);</highlight></codeline>
<codeline lineno="433"><highlight class="normal"></highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Find<sp/>our<sp/>mount<sp/>point<sp/>or<sp/>set<sp/>default<sp/>to<sp/>sys<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mountPoint<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref><sp/>=<sp/><ref refid="mount_8c_1aa8cc926aa9badb781158b6738b1b0f2d" kindref="member">vfs_findMount</ref>(</highlight><highlight class="stringliteral">&quot;sys&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref><sp/>=<sp/><ref refid="mount_8c_1aa8cc926aa9badb781158b6738b1b0f2d" kindref="member">vfs_findMount</ref>(mountPoint);</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="441"><highlight class="normal"></highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Mount<sp/>Point<sp/>Bad\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="446"><highlight class="normal"></highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>Will<sp/>Set<sp/>Up<sp/>The<sp/>Descriptor<sp/>Modes<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" kindref="member">mode</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>!=<sp/>flags[i];<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(flags[i])<sp/>{</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;w&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;W&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" kindref="member">mode</ref><sp/>|=<sp/><ref refid="include_2vfs_2vfs_8h_1a4898b5a1a1daebda9d11b4afde062e5c" kindref="member">fileWrite</ref>;</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;r&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;R&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" kindref="member">mode</ref><sp/>|=<sp/><ref refid="include_2vfs_2vfs_8h_1ae8e814536103f514b8460ec7a0fc4553" kindref="member">fileRead</ref>;</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;b&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;B&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" kindref="member">mode</ref><sp/>|=<sp/><ref refid="include_2vfs_2vfs_8h_1a3e8798b0a6e30da29349c1b6d827f52a" kindref="member">fileBinary</ref>;</highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;a&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;A&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" kindref="member">mode</ref><sp/>|=<sp/><ref refid="include_2vfs_2vfs_8h_1ae4c27d5653358d16438504434867dfff" kindref="member">fileAppend</ref>;</highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Invalid<sp/>mode<sp/>&apos;%c&apos;<sp/>for<sp/>fopen\n&quot;</highlight><highlight class="normal">,<sp/>flags[i]);</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="472"><highlight class="normal"></highlight></codeline>
<codeline lineno="473"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Search<sp/>For<sp/>The<sp/>File<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1af2816f106f39d0355faf5689d92a9b8b" kindref="member">vfsOpenFile</ref>(tmpFd-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>,<sp/>tmpFd)<sp/>==<sp/>0x1)<sp/>{</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>The<sp/>File<sp/>Is<sp/>Found<sp/>Then<sp/>Set<sp/>Up<sp/>The<sp/>Descriptor<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="476"><highlight class="normal"></highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>in<sp/>order<sp/>to<sp/>save<sp/>resources<sp/>we<sp/>will<sp/>allocate<sp/>the<sp/>buffer<sp/>later<sp/>when<sp/>it<sp/>is<sp/>needed<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="478"><highlight class="normal"></highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(4096);</highlight></codeline>
<codeline lineno="480"><highlight class="normal"></highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd);</highlight></codeline>
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Error:<sp/>tmpFd-&gt;buffer<sp/>==<sp/>NULL,<sp/>File:<sp/>%s,<sp/>Line:<sp/>%i\n&quot;</highlight><highlight class="normal">,<sp/>__FILE__,<sp/>__LINE__);</highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;fdTable_lock);</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="487"><highlight class="normal"></highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>Its<sp/>Status<sp/>To<sp/>Open<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" kindref="member">status</ref><sp/>=<sp/><ref refid="include_2vfs_2vfs_8h_1a249a3d8cdfed3302062ad215b95a4294" kindref="member">fdOpen</ref>;</highlight></codeline>
<codeline lineno="490"><highlight class="normal"></highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Initial<sp/>File<sp/>Offset<sp/>Is<sp/>Zero<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1afd9051274bbedc680cce81a6a5fd6b2a" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="494"><highlight class="normal"></highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>we<sp/>do<sp/>not<sp/>want<sp/>to<sp/>be<sp/>in<sp/>a<sp/>spinlock<sp/>longer<sp/>than<sp/>we<sp/>need<sp/>to,<sp/>so</highlight></codeline>
<codeline lineno="496"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>it<sp/>has<sp/>been<sp/>moved<sp/>to<sp/>here.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1a71f03d2ba55111c715b6068254847a53" kindref="member">spinLock</ref>(&amp;fdTable_lock);</highlight></codeline>
<codeline lineno="498"><highlight class="normal"></highlight></codeline>
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Increment<sp/>Number<sp/>Of<sp/>Open<sp/>Files<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vitals_8h_1a67aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_1ab6d461dac1c971bc1ed384a9b0779d21" kindref="member">openFiles</ref>++;</highlight></codeline>
<codeline lineno="501"><highlight class="normal"></highlight></codeline>
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ad83171631d4363bfb418aeac21a225c2" kindref="member">next</ref><sp/>=<sp/><ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref>;</highlight></codeline>
<codeline lineno="503"><highlight class="normal"></highlight></codeline>
<codeline lineno="504"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref>-&gt;<ref refid="structfileDescriptor_1afd9051274bbedc680cce81a6a5fd6b2a" kindref="member">prev</ref><sp/>=<sp/>tmpFd;</highlight></codeline>
<codeline lineno="506"><highlight class="normal"></highlight></codeline>
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref><sp/>=<sp/>tmpFd;</highlight></codeline>
<codeline lineno="508"><highlight class="normal"></highlight></codeline>
<codeline lineno="509"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;fdTable_lock);</highlight></codeline>
<codeline lineno="510"><highlight class="normal"></highlight></codeline>
<codeline lineno="511"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>The<sp/>FD<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="512"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(tmpFd);</highlight></codeline>
<codeline lineno="513"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;Freeing&quot;);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="516"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>);</highlight></codeline>
<codeline lineno="517"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd);</highlight></codeline>
<codeline lineno="518"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;fdTable_lock);</highlight></codeline>
<codeline lineno="519"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//MrOlsen<sp/>(2016-01-13)<sp/>NOTE:<sp/>We<sp/>don&apos;t<sp/>need<sp/>this<sp/>right<sp/>now<sp/>kprintf(&quot;File<sp/>Not<sp/>Found?<sp/>%s\n&quot;,file);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="521"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="522"><highlight class="normal"></highlight></codeline>
<codeline lineno="523"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>NULL<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="524"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="525"><highlight class="normal">}</highlight></codeline>
<codeline lineno="526" refid="include_2vfs_2file_8h_1a73224c70c8caaeed4f6b507f5089147c" refkind="member"><highlight class="normal"></highlight></codeline>
<codeline lineno="527"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="528"><highlight class="comment"></highlight></codeline>
<codeline lineno="529"><highlight class="comment"><sp/>Function:<sp/>int<sp/>fclose(fileDescriptor_t<sp/>*fd);</highlight></codeline>
<codeline lineno="530"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Will<sp/>Close<sp/>And<sp/>Free<sp/>A<sp/>File<sp/>Descriptor</highlight></codeline>
<codeline lineno="531"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="532"><highlight class="comment"></highlight></codeline>
<codeline lineno="533"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="534"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a62ac32695420234cb7ccbcfc6cabd4a4" kindref="member">fclose</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>)<sp/>{</highlight></codeline>
<codeline lineno="535"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*tmpFd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="536"><highlight class="normal"></highlight></codeline>
<codeline lineno="537"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref><sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="538"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="539"><highlight class="normal"></highlight></codeline>
<codeline lineno="540"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1a71f03d2ba55111c715b6068254847a53" kindref="member">spinLock</ref>(&amp;fdTable_lock);</highlight></codeline>
<codeline lineno="541"><highlight class="normal"></highlight></codeline>
<codeline lineno="542"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,<sp/>__FILE__,<sp/>__LINE__);</highlight></codeline>
<codeline lineno="543"><highlight class="normal"></highlight></codeline>
<codeline lineno="544"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpFd<sp/>=<sp/><ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref>;<sp/>tmpFd<sp/>!=<sp/>0x0;<sp/>tmpFd<sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ad83171631d4363bfb418aeac21a225c2" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="545"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd<sp/>==<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>)<sp/>{</highlight></codeline>
<codeline lineno="546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;DUP:<sp/>[%i:0x%X]&quot;</highlight><highlight class="normal">,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a8df095a5809b8dcef834ecc696fb39a4" kindref="member">dup</ref>,<sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="547"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a8df095a5809b8dcef834ecc696fb39a4" kindref="member">dup</ref><sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="548"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a8df095a5809b8dcef834ecc696fb39a4" kindref="member">dup</ref>--;</highlight></codeline>
<codeline lineno="549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1a8df095a5809b8dcef834ecc696fb39a4" kindref="member">dup</ref><sp/>=<sp/>-2;</highlight></codeline>
<codeline lineno="551"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1acf8de2682bb1eaedd14cc477895982d5" kindref="member">res</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="fat__filelib_8c_1aef5675bf1c0db1d3e073ea36d4cf2d3a" kindref="member">fl_fclose</ref>(<ref refid="structfile_1af2108e4a1620fe81b2b5e7b6db5d41d4" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptor_1acf8de2682bb1eaedd14cc477895982d5" kindref="member">res</ref>);</highlight></codeline>
<codeline lineno="553"><highlight class="normal"></highlight></codeline>
<codeline lineno="554"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptor_1afd9051274bbedc680cce81a6a5fd6b2a" kindref="member">prev</ref>)</highlight></codeline>
<codeline lineno="555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1afd9051274bbedc680cce81a6a5fd6b2a" kindref="member">prev</ref>-&gt;<ref refid="structfileDescriptor_1ad83171631d4363bfb418aeac21a225c2" kindref="member">next</ref><sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ad83171631d4363bfb418aeac21a225c2" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="556"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptor_1ad83171631d4363bfb418aeac21a225c2" kindref="member">next</ref>)</highlight></codeline>
<codeline lineno="557"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ad83171631d4363bfb418aeac21a225c2" kindref="member">next</ref>-&gt;<ref refid="structfileDescriptor_1afd9051274bbedc680cce81a6a5fd6b2a" kindref="member">prev</ref><sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1afd9051274bbedc680cce81a6a5fd6b2a" kindref="member">prev</ref>;</highlight></codeline>
<codeline lineno="558"><highlight class="normal"></highlight></codeline>
<codeline lineno="559"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd<sp/>==<sp/><ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref>)</highlight></codeline>
<codeline lineno="560"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="file_8c_1acc7848731c780c8a5c224413af7e9a68" kindref="member">fdTable</ref><sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptor_1ad83171631d4363bfb418aeac21a225c2" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="561"><highlight class="normal"></highlight></codeline>
<codeline lineno="562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vitals_8h_1a67aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_1ab6d461dac1c971bc1ed384a9b0779d21" kindref="member">openFiles</ref>--;</highlight></codeline>
<codeline lineno="563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;fdTable_lock);</highlight></codeline>
<codeline lineno="564"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="565"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>);</highlight></codeline>
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd);</highlight></codeline>
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="568"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="569"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="570"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="571"><highlight class="normal"></highlight></codeline>
<codeline lineno="572"><highlight class="normal"><sp/><sp/><ref refid="armv6_2spinlock_8c_1ae29ab191c93f9ead066cb462dd2e7247" kindref="member">spinUnlock</ref>(&amp;fdTable_lock);</highlight></codeline>
<codeline lineno="573"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x1);</highlight></codeline>
<codeline lineno="574"><highlight class="normal">}</highlight></codeline>
<codeline lineno="575"><highlight class="normal"></highlight></codeline>
<codeline lineno="576" refid="file_8c_1a81e426f86ee3d066c32986948fe3f6fd" refkind="member"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>UBU<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="577"><highlight class="normal"></highlight></codeline>
<codeline lineno="578"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="579"><highlight class="comment"></highlight></codeline>
<codeline lineno="580"><highlight class="comment"><sp/>Function:<sp/>void<sp/>sysMkDir(const<sp/>char<sp/>*path)</highlight></codeline>
<codeline lineno="581"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Will<sp/>Create<sp/>A<sp/>New<sp/>Directory</highlight></codeline>
<codeline lineno="582"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="583"><highlight class="comment"></highlight></codeline>
<codeline lineno="584"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="585"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="file_8c_1a81e426f86ee3d066c32986948fe3f6fd" kindref="member">sysMkDir</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*path)<sp/>{</highlight></codeline>
<codeline lineno="586"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*tmpFD<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="587"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>tmpDir[1024];</highlight></codeline>
<codeline lineno="588"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>rootPath[256];</highlight></codeline>
<codeline lineno="589"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*dir<sp/>=<sp/>0x0;<sp/></highlight><highlight class="comment">//UBU*mountPoint<sp/>=<sp/>0x0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="590"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*tmp<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="591"><highlight class="normal"><sp/><sp/>rootPath[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="592"><highlight class="normal"><sp/><sp/>dir<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>path;</highlight></codeline>
<codeline lineno="593"><highlight class="normal"></highlight></codeline>
<codeline lineno="594"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(path,<sp/></highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpDir,<sp/></highlight><highlight class="stringliteral">&quot;%s%s&quot;</highlight><highlight class="normal">,<sp/><ref refid="armv6_2sched_8c_1a54397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_1a0933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1ae9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<sp/>path);</highlight></codeline>
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/>dir<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>&amp;tmpDir;</highlight></codeline>
<codeline lineno="597"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="598"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(<ref refid="string_8h_1adcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(dir,<sp/></highlight><highlight class="stringliteral">&quot;/&quot;</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
<codeline lineno="599"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rootPath[0]<sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(rootPath,<sp/></highlight><highlight class="stringliteral">&quot;%s/&quot;</highlight><highlight class="normal">,<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(dir,<sp/></highlight><highlight class="stringliteral">&quot;/&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="601"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(rootPath,<sp/></highlight><highlight class="stringliteral">&quot;%s%s/&quot;</highlight><highlight class="normal">,<sp/>rootPath,<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(dir,<sp/></highlight><highlight class="stringliteral">&quot;/&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="603"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp<sp/>=<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="604"><highlight class="normal"><sp/><sp/><sp/><sp/>dir<sp/>=<sp/>tmp;</highlight></codeline>
<codeline lineno="605"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="606"><highlight class="normal"></highlight></codeline>
<codeline lineno="607"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;rootPath:<sp/>[%s]\n&quot;,rootPath);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="608"><highlight class="normal"><sp/><sp/>tmpFD<sp/>=<sp/><ref refid="file_8c_1a249f3bc0af043dc5ac3c9aa8646986af" kindref="member">fopen</ref>(rootPath,<sp/></highlight><highlight class="stringliteral">&quot;rb&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="609"><highlight class="normal"></highlight></codeline>
<codeline lineno="610"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFD-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="611"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Invalid<sp/>Mount<sp/>Point\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="612"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="613"><highlight class="normal"><sp/><sp/>tmpFD-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1a4cd903f29e242ecc35938b91d43c4ba5" kindref="member">vfsMakeDir</ref>(dir,<sp/>tmpFD);</highlight></codeline>
<codeline lineno="614"><highlight class="normal"></highlight></codeline>
<codeline lineno="615"><highlight class="normal"><sp/><sp/><ref refid="file_8c_1a62ac32695420234cb7ccbcfc6cabd4a4" kindref="member">fclose</ref>(tmpFD);</highlight></codeline>
<codeline lineno="616"><highlight class="normal"></highlight></codeline>
<codeline lineno="617"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="618" refid="include_2vfs_2file_8h_1a28af9471bbdf262321af663e02899a47" refkind="member"><highlight class="normal">}</highlight></codeline>
<codeline lineno="619"><highlight class="normal"></highlight></codeline>
<codeline lineno="620"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="621"><highlight class="comment"></highlight></codeline>
<codeline lineno="622"><highlight class="comment"><sp/>Function:<sp/>int<sp/>unlink(const<sp/>char<sp/>*node)</highlight></codeline>
<codeline lineno="623"><highlight class="comment"><sp/>Description:<sp/>This<sp/>will<sp/>unlink<sp/>a<sp/>file</highlight></codeline>
<codeline lineno="624"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="625"><highlight class="comment"></highlight></codeline>
<codeline lineno="626"><highlight class="comment"><sp/>************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="627"><highlight class="normal"></highlight></codeline>
<codeline lineno="628"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1ada4d877b19c34ce3137e0c35dab6e947" kindref="member">unlink</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*node)<sp/>{</highlight></codeline>
<codeline lineno="629"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*path<sp/>=<sp/>0x0,<sp/>*mountPoint<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="630"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structvfs__mountPoint" kindref="compound">vfs_mountPoint</ref><sp/>*mp<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="631"><highlight class="normal"></highlight></codeline>
<codeline lineno="632"><highlight class="normal"><sp/><sp/>path<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*)<sp/>node,<sp/></highlight><highlight class="stringliteral">&quot;@&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="633"><highlight class="normal"><sp/><sp/><ref refid="structvfs__mountPoint_1a30136b0c8a7040142fefc3b3d8038eaf" kindref="member">mountPoint</ref><sp/>=<sp/><ref refid="string_8h_1a9af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="634"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structvfs__mountPoint_1a30136b0c8a7040142fefc3b3d8038eaf" kindref="member">mountPoint</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="635"><highlight class="normal"><sp/><sp/><sp/><sp/>mp<sp/>=<sp/><ref refid="mount_8c_1aa8cc926aa9badb781158b6738b1b0f2d" kindref="member">vfs_findMount</ref>(</highlight><highlight class="stringliteral">&quot;sys&quot;</highlight><highlight class="normal">);<sp/></highlight><highlight class="comment">/*<sp/>_current-&gt;oInfo.container;<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="636"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="637"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="638"><highlight class="normal"><sp/><sp/><sp/><sp/>mp<sp/>=<sp/><ref refid="mount_8c_1aa8cc926aa9badb781158b6738b1b0f2d" kindref="member">vfs_findMount</ref>(<ref refid="structvfs__mountPoint_1a30136b0c8a7040142fefc3b3d8038eaf" kindref="member">mountPoint</ref>);</highlight></codeline>
<codeline lineno="639"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="640"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mp<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="641"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kpanic(&quot;Mount<sp/>Point<sp/>Bad&quot;);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="642"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="643"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="644"><highlight class="normal"><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1ad8f269aaf16c2ed5b2171b18a0bee418" kindref="member">vfsUnlink</ref>(path,<sp/>mp);</highlight></codeline>
<codeline lineno="645"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="646"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/fs/vfs/file.c"/>
  </compounddef>
</doxygen>
