<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.4.7">
  <compounddef id="file_8c" kind="file">
    <compoundname>file.c</compoundname>
    <includes refid="vfs_8h" local="no">vfs/vfs.h</includes>
    <includes refid="file_8h" local="no">vfs/file.h</includes>
    <includes refid="sched_8h" local="no">ubixos/sched.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="lib_2string_8h" local="no">lib/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>
    <incdepgraph>
      <node id="6044">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6052">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="6045">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
        <childnode refid="6046" relation="include">
        </childnode>
        <childnode refid="6039" relation="include">
        </childnode>
        <childnode refid="6047" relation="include">
        </childnode>
        <childnode refid="6044" relation="include">
        </childnode>
      </node>
      <node id="6053">
        <label>ubixos/spinlock.h</label>
        <link refid="spinlock_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6048">
        <label>ubixos/vitals.h</label>
        <link refid="vitals_8h"/>
        <childnode refid="6049" relation="include">
        </childnode>
        <childnode refid="6036" relation="include">
        </childnode>
      </node>
      <node id="6037">
        <label>ubixos/types.h</label>
        <link refid="types_8h"/>
        <childnode refid="6038" relation="include">
        </childnode>
      </node>
      <node id="6038">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="6055">
        <label>lib/string.h</label>
        <link refid="lib_2string_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6056">
        <label>vmm/paging.h</label>
        <link refid="paging_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
        <childnode refid="6042" relation="include">
        </childnode>
        <childnode refid="6044" relation="include">
        </childnode>
      </node>
      <node id="6050">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
        <childnode refid="6051" relation="include">
        </childnode>
      </node>
      <node id="6039">
        <label>vfs/file.h</label>
        <link refid="file_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
        <childnode refid="6040" relation="include">
        </childnode>
        <childnode refid="6041" relation="include">
        </childnode>
      </node>
      <node id="6047">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6054">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6036">
        <label>vfs/vfs.h</label>
        <link refid="vfs_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
        <childnode refid="6039" relation="include">
        </childnode>
        <childnode refid="6041" relation="include">
        </childnode>
        <childnode refid="6042" relation="include">
        </childnode>
        <childnode refid="6044" relation="include">
        </childnode>
      </node>
      <node id="6041">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6057">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6058">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="6049">
        <label>ubixos/ubthread.h</label>
        <link refid="ubthread_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
        <childnode refid="6045" relation="include">
        </childnode>
        <childnode refid="6050" relation="include">
        </childnode>
      </node>
      <node id="6040">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6042">
        <label>sys/sysproto.h</label>
        <link refid="sysproto_8h"/>
        <childnode refid="6043" relation="include">
        </childnode>
        <childnode refid="6044" relation="include">
        </childnode>
      </node>
      <node id="6043">
        <label>sys/signal.h</label>
        <link refid="signal_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6046">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="6037" relation="include">
        </childnode>
      </node>
      <node id="6051">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="6035">
        <label>src/sys/vfs/file.c</label>
        <link refid="file.c"/>
        <childnode refid="6036" relation="include">
        </childnode>
        <childnode refid="6039" relation="include">
        </childnode>
        <childnode refid="6045" relation="include">
        </childnode>
        <childnode refid="6048" relation="include">
        </childnode>
        <childnode refid="6052" relation="include">
        </childnode>
        <childnode refid="6053" relation="include">
        </childnode>
        <childnode refid="6054" relation="include">
        </childnode>
        <childnode refid="6055" relation="include">
        </childnode>
        <childnode refid="6056" relation="include">
        </childnode>
        <childnode refid="6057" relation="include">
        </childnode>
        <childnode refid="6058" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="file_8c_1789959682f4ac8df2d89ea6450efda8b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fclose</definition>
        <argsstring>(fileDescriptor *fd)</argsstring>
        <name>fclose</name>
        <param>
          <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="398" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="398" bodyend="425"/>
        <references refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structfileDescriptorStruct_1cbc0897e87c2c167cdb8cb1beb77f598" compoundref="file_8h" startline="57">fileDescriptorStruct::buffer</references>
        <references refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" compoundref="file_8c" startline="45">fdTable</references>
        <references refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" compoundref="file_8c" startline="42">fdTable_lock</references>
        <references refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" compoundref="kmalloc_8c" startline="351" endline="391">kfree</references>
        <references refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" compoundref="file_8h" startline="48">fileDescriptorStruct::next</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
        <references refid="structvitalsStruct_14398d65a35290bc00027b6c8a4e049c8" compoundref="vitals_8h" startline="39">vitalsStruct::openFiles</references>
        <references refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" compoundref="file_8h" startline="47">fileDescriptorStruct::prev</references>
        <references refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" compoundref="spinlock_8c" startline="56" endline="62">spinLock</references>
        <references refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" compoundref="spinlock_8c" startline="37" endline="46">spinUnlock</references>
        <references refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" compoundref="timer_8S" startline="35">systemVitals</references>
        <references refid="ap-boot_8S_11a3ac2137e21f6f0d400f1996914dd19" compoundref="ap-boot_8S" startline="6">x1</references>
        <referencedby refid="elf_8c_1f11ec9e50bcff723428b0c911a177fd0" compoundref="elf_8c" startline="111" endline="185">elf_loadfile</referencedby>
        <referencedby refid="exec_8c_1f80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="143" endline="323">execFile</referencedby>
        <referencedby refid="kmod_8c_192b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="75" endline="211">kmod_load</referencedby>
        <referencedby refid="ld_8c_1b0622e93915d1824df770950e425875f" compoundref="ld_8c" startline="42" endline="176">ldEnable</referencedby>
        <referencedby refid="exec_8c_1094c23346b6d226a03866a54b755ed64" compoundref="exec_8c" startline="552" endline="716">sys_exec</referencedby>
        <referencedby refid="exec_8c_1219681612352232186a0f568457d851d" compoundref="exec_8c" startline="334" endline="546">sysExec</referencedby>
        <referencedby refid="file_8c_179ea7e7d939ab058bf2b53fdbfee42c6" compoundref="file_8c" startline="157" endline="171">sysFclose</referencedby>
        <referencedby refid="file_8c_181e426f86ee3d066c32986948fe3f6fd" compoundref="file_8c" startline="436" endline="469">sysMkDir</referencedby>
        <referencedby refid="systemtask_8c_1c7cc6a806237f8657fcdce169319fd7f" compoundref="systemtask_8c" startline="48" endline="118">systemTask</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_16745ded7e707449e4f248d86dc76da4f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int feof</definition>
        <argsstring>(fileDescriptor *fd)</argsstring>
        <name>feof</name>
        <param>
          <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="220" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="220" bodyend="225"/>
        <references refid="vfs_8h_14907ecb6121af1b80c5c5b436ebe3cb5" compoundref="vfs_8h" startline="43">fdEof</references>
        <references refid="structfileDescriptorStruct_1dd78e2b569c4813dc1b171f4203f3e6b" compoundref="file_8h" startline="50">fileDescriptorStruct::status</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1dfedd6c658c329d13d5a90a7462f5979" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fgetc</definition>
        <argsstring>(fileDescriptor *fd)</argsstring>
        <name>fgetc</name>
        <param>
          <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="251" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="251" bodyend="262"/>
        <references refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="38">vfs_mountPoint::fs</references>
        <references refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" compoundref="file_8h" startline="49">fileDescriptorStruct::mp</references>
        <references refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" compoundref="file_8h" startline="52">fileDescriptorStruct::offset</references>
        <references refid="structfileSystem_1c5639f8b5425e84b0e25b183f18dbb7a">fileSystem::vfsRead</references>
        <referencedby refid="file_8c_104b3a6449e24cc27188e1f4b9a9d8225" compoundref="file_8c" startline="59" endline="86">sysFgetc</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_13c11b2679cf37c72b05eaab50c282e72" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
        <definition>fileDescriptor* fopen</definition>
        <argsstring>(const char *file, const char *flags)</argsstring>
        <name>fopen</name>
        <param>
          <type>const char *</type>
          <declname>file</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>flags</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="274" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="274" bodyend="389"/>
        <references refid="structfileDescriptorStruct_1cbc0897e87c2c167cdb8cb1beb77f598" compoundref="file_8h" startline="57">fileDescriptorStruct::buffer</references>
        <references refid="vfs_8h_1249a3d8cdfed3302062ad215b95a4294" compoundref="vfs_8h" startline="41">fdOpen</references>
        <references refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" compoundref="file_8c" startline="45">fdTable</references>
        <references refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" compoundref="file_8c" startline="42">fdTable_lock</references>
        <references refid="vfs_8h_1e4c27d5653358d16438504434867dfff" compoundref="vfs_8h" startline="49">fileAppend</references>
        <references refid="vfs_8h_13e8798b0a6e30da29349c1b6d827f52a" compoundref="vfs_8h" startline="48">fileBinary</references>
        <references refid="structfileDescriptorStruct_14ca84ca208f0bcd97d654f99a55724f6" compoundref="file_8h" startline="56">fileDescriptorStruct::fileName</references>
        <references refid="vfs_8h_1e8e814536103f514b8460ec7a0fc4553" compoundref="vfs_8h" startline="46">fileRead</references>
        <references refid="vfs_8h_14898b5a1a1daebda9d11b4afde062e5c" compoundref="vfs_8h" startline="47">fileWrite</references>
        <references refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="38">vfs_mountPoint::fs</references>
        <references refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" compoundref="kmalloc_8c" startline="351" endline="391">kfree</references>
        <references refid="kmalloc_8h_1150eab2ac4ce4553e21ca10e7f441762" compoundref="kmalloc_8c" startline="247" endline="339">kmalloc</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structfileDescriptorStruct_18c43ddd6ff5fd5383bcdde5896846e98" compoundref="file_8h" startline="51">fileDescriptorStruct::mode</references>
        <references refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" compoundref="file_8h" startline="49">fileDescriptorStruct::mp</references>
        <references refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" compoundref="file_8h" startline="48">fileDescriptorStruct::next</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
        <references refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" compoundref="file_8h" startline="52">fileDescriptorStruct::offset</references>
        <references refid="structvitalsStruct_14398d65a35290bc00027b6c8a4e049c8" compoundref="vitals_8h" startline="39">vitalsStruct::openFiles</references>
        <references refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" compoundref="file_8h" startline="47">fileDescriptorStruct::prev</references>
        <references refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" compoundref="spinlock_8c" startline="56" endline="62">spinLock</references>
        <references refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" compoundref="spinlock_8c" startline="37" endline="46">spinUnlock</references>
        <references refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="51" endline="58">sprintf</references>
        <references refid="structfileDescriptorStruct_1dd78e2b569c4813dc1b171f4203f3e6b" compoundref="file_8h" startline="50">fileDescriptorStruct::status</references>
        <references refid="strcpy_8S_19132520cc79236b654666f4ddc1b516c" compoundref="strcpy_8S" startline="3">strcpy</references>
        <references refid="lib_2string_8h_1dcec9a82a6a276e8edb0fd4fc26fe8f2" compoundref="string_8c" startline="118" endline="133">strstr</references>
        <references refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" compoundref="strtok_8c" startline="74" endline="77">strtok</references>
        <references refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" compoundref="timer_8S" startline="35">systemVitals</references>
        <references refid="mount_8h_1a8cc926aa9badb781158b6738b1b0f2d" compoundref="mount_8c" startline="132" endline="142">vfs_findMount</references>
        <references refid="structfileSystem_10fdae1689e7c9d514c635f790b11635d">fileSystem::vfsOpenFile</references>
        <referencedby refid="elf_8c_1f11ec9e50bcff723428b0c911a177fd0" compoundref="elf_8c" startline="111" endline="185">elf_loadfile</referencedby>
        <referencedby refid="exec_8c_1f80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="143" endline="323">execFile</referencedby>
        <referencedby refid="kmod_8c_192b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="75" endline="211">kmod_load</referencedby>
        <referencedby refid="ld_8c_1b0622e93915d1824df770950e425875f" compoundref="ld_8c" startline="42" endline="176">ldEnable</referencedby>
        <referencedby refid="exec_8c_1094c23346b6d226a03866a54b755ed64" compoundref="exec_8c" startline="552" endline="716">sys_exec</referencedby>
        <referencedby refid="vfs_8c_13ca4e48103cbadae2952d277d03687be" compoundref="vfs_8c" startline="148" endline="166">sys_open</referencedby>
        <referencedby refid="exec_8c_1219681612352232186a0f568457d851d" compoundref="exec_8c" startline="334" endline="546">sysExec</referencedby>
        <referencedby refid="file_8c_111af8c48fc1b1a08d97e8082d553c143" compoundref="file_8c" startline="122" endline="131">sysFopen</referencedby>
        <referencedby refid="file_8c_181e426f86ee3d066c32986948fe3f6fd" compoundref="file_8c" startline="436" endline="469">sysMkDir</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1c49e133f264f7aa16d63ba1f404be8ac" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fputc</definition>
        <argsstring>(int ch, fileDescriptor *fd)</argsstring>
        <name>fputc</name>
        <param>
          <type>int</type>
          <declname>ch</declname>
        </param>
        <param>
          <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="234" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="234" bodyend="242"/>
        <references refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="38">vfs_mountPoint::fs</references>
        <references refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" compoundref="file_8h" startline="49">fileDescriptorStruct::mp</references>
        <references refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" compoundref="file_8h" startline="52">fileDescriptorStruct::offset</references>
        <references refid="structfileSystem_10a4a469c38583399be85b1b9d63875c3">fileSystem::vfsWrite</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_13b06878a03209e88c008c77234b89359" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
        <definition>size_t fread</definition>
        <argsstring>(void *ptr, size_t size, size_t nmemb, fileDescriptor *fd)</argsstring>
        <name>fread</name>
        <param>
          <type>void *</type>
          <declname>ptr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
          <declname>size</declname>
        </param>
        <param>
          <type><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
          <declname>nmemb</declname>
        </param>
        <param>
          <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="178" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="178" bodyend="198"/>
        <references refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="38">vfs_mountPoint::fs</references>
        <references refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" compoundref="file_8h" startline="49">fileDescriptorStruct::mp</references>
        <references refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" compoundref="file_8h" startline="52">fileDescriptorStruct::offset</references>
        <references refid="structfileSystem_1c5639f8b5425e84b0e25b183f18dbb7a">fileSystem::vfsRead</references>
        <referencedby refid="elf_8c_1f11ec9e50bcff723428b0c911a177fd0" compoundref="elf_8c" startline="111" endline="185">elf_loadfile</referencedby>
        <referencedby refid="exec_8c_1f80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="143" endline="323">execFile</referencedby>
        <referencedby refid="kmod_8c_192b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="75" endline="211">kmod_load</referencedby>
        <referencedby refid="ld_8c_1b0622e93915d1824df770950e425875f" compoundref="ld_8c" startline="42" endline="176">ldEnable</referencedby>
        <referencedby refid="gen__calls_8c_15eff3a25d417fafce7c4f211db219ca2" compoundref="gen__calls_8c" startline="125" endline="144">read</referencedby>
        <referencedby refid="exec_8c_1094c23346b6d226a03866a54b755ed64" compoundref="exec_8c" startline="552" endline="716">sys_exec</referencedby>
        <referencedby refid="exec_8c_1219681612352232186a0f568457d851d" compoundref="exec_8c" startline="334" endline="546">sysExec</referencedby>
        <referencedby refid="file_8c_158d31e6659ae90bb9a1a78e238110b08" compoundref="file_8c" startline="140" endline="148">sysFread</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_19e0ce64b32581a1d0337031d9ca07dfb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fseek</definition>
        <argsstring>(fileDescriptor *tmpFd, long offset, int whence)</argsstring>
        <name>fseek</name>
        <param>
          <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</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="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="208" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="208" bodyend="211"/>
        <references refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" compoundref="file_8h" startline="52">fileDescriptorStruct::offset</references>
        <referencedby refid="elf_8c_1f11ec9e50bcff723428b0c911a177fd0" compoundref="elf_8c" startline="111" endline="185">elf_loadfile</referencedby>
        <referencedby refid="exec_8c_1f80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="143" endline="323">execFile</referencedby>
        <referencedby refid="kmod_8c_192b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="75" endline="211">kmod_load</referencedby>
        <referencedby refid="ld_8c_1b0622e93915d1824df770950e425875f" compoundref="ld_8c" startline="42" endline="176">ldEnable</referencedby>
        <referencedby refid="exec_8c_1094c23346b6d226a03866a54b755ed64" compoundref="exec_8c" startline="552" endline="716">sys_exec</referencedby>
        <referencedby refid="exec_8c_1219681612352232186a0f568457d851d" compoundref="exec_8c" startline="334" endline="546">sysExec</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1ca6c1e5b57dc9f5d8551b41ea98bfbb7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
        <definition>size_t fwrite</definition>
        <argsstring>(void *ptr, int size, int nmemb, fileDescriptor *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="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="200" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="200" bodyend="206"/>
        <references refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="38">vfs_mountPoint::fs</references>
        <references refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" compoundref="file_8h" startline="49">fileDescriptorStruct::mp</references>
        <references refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" compoundref="file_8h" startline="52">fileDescriptorStruct::offset</references>
        <references refid="structfileSystem_10a4a469c38583399be85b1b9d63875c3">fileSystem::vfsWrite</references>
        <referencedby refid="file_8c_11a17e9753f6c9d2b34c35a2b2e7d240e" compoundref="file_8c" startline="49" endline="57">sysFwrite</referencedby>
      </memberdef>
      <memberdef kind="function" id="file_8c_1911a71c3e0e08149a11b2b05a50b3b97" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysChDir</definition>
        <argsstring>(const char *path)</argsstring>
        <name>sysChDir</name>
        <param>
          <type>const char *</type>
          <declname>path</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="102" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="102" bodyend="109"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" compoundref="sched_8h" startline="51">osInfo::cwd</references>
        <references refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" compoundref="sched_8h" startline="60">taskStruct::oInfo</references>
        <references refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="51" endline="58">sprintf</references>
        <references refid="lib_2string_8h_1dcec9a82a6a276e8edb0fd4fc26fe8f2" compoundref="string_8c" startline="118" endline="133">strstr</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_179ea7e7d939ab058bf2b53fdbfee42c6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysFclose</definition>
        <argsstring>(userFileDescriptor *userFd, int *status)</argsstring>
        <name>sysFclose</name>
        <param>
          <type><ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref> *</type>
          <declname>userFd</declname>
        </param>
        <param>
          <type>int *</type>
          <declname>status</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="157" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="157" bodyend="171"/>
        <references refid="file_8h_1872c22366b4c63f4bdb10cd3b7980b11" compoundref="file_8c" startline="398" endline="425">fclose</references>
        <references refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" compoundref="file_8h" startline="68">userFileDescriptorStruct::fd</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_104b3a6449e24cc27188e1f4b9a9d8225" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysFgetc</definition>
        <argsstring>(int *ptr, userFileDescriptor *userFd)</argsstring>
        <name>sysFgetc</name>
        <param>
          <type>int *</type>
          <declname>ptr</declname>
        </param>
        <param>
          <type><ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref> *</type>
          <declname>userFd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="59" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="59" bodyend="86"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" compoundref="file_8h" startline="68">userFileDescriptorStruct::fd</references>
        <references refid="file_8h_1dfedd6c658c329d13d5a90a7462f5979" compoundref="file_8c" startline="251" endline="262">fgetc</references>
        <references refid="atkbd_8c_19e32494b8c0797b73c41a50c698f0c04" compoundref="atkbd_8c" startline="329" endline="375">getch</references>
        <references refid="sched_8h_108933fe6d593a1c78b9080359f15a0b7" compoundref="sched_8c" startline="259" endline="261">sched_yield</references>
        <references refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" compoundref="sched_8h" startline="66">taskStruct::term</references>
        <references refid="tty_8h_1afbb5679104334c34d7691b2de7d7a86" compoundref="tty_8c" startline="39">tty_foreground</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_111af8c48fc1b1a08d97e8082d553c143" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysFopen</definition>
        <argsstring>(const char *file, char *flags, userFileDescriptor *userFd)</argsstring>
        <name>sysFopen</name>
        <param>
          <type>const char *</type>
          <declname>file</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>flags</declname>
        </param>
        <param>
          <type><ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref> *</type>
          <declname>userFd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="122" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="122" bodyend="131"/>
        <references refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" compoundref="file_8h" startline="68">userFileDescriptorStruct::fd</references>
        <references refid="structuserFileDescriptorStruct_149b5731913f50c40d0c12b8c8e89b020" compoundref="file_8h" startline="69">userFileDescriptorStruct::fdSize</references>
        <references refid="file_8h_1d6a41ac88a7d46d574e8a675fdde136c" compoundref="file_8c" startline="274" endline="389">fopen</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
        <references refid="structfileDescriptorStruct_197eb3dcefe53610658dc341ca449e290" compoundref="file_8h" startline="53">fileDescriptorStruct::size</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_158d31e6659ae90bb9a1a78e238110b08" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysFread</definition>
        <argsstring>(void *data, long size, userFileDescriptor *userFd)</argsstring>
        <name>sysFread</name>
        <param>
          <type>void *</type>
          <declname>data</declname>
        </param>
        <param>
          <type>long</type>
          <declname>size</declname>
        </param>
        <param>
          <type><ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref> *</type>
          <declname>userFd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="140" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="140" bodyend="148"/>
        <references refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" compoundref="file_8h" startline="68">userFileDescriptorStruct::fd</references>
        <references refid="file_8h_13b06878a03209e88c008c77234b89359" compoundref="file_8c" startline="178" endline="198">fread</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_16ff1131020b7a50805dc848fcd9c03b2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysFseek</definition>
        <argsstring>(userFileDescriptor *userFd, long offset, int whence)</argsstring>
        <name>sysFseek</name>
        <param>
          <type><ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref> *</type>
          <declname>userFd</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="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="92" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="92" bodyend="100"/>
        <references refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" compoundref="file_8h" startline="68">userFileDescriptorStruct::fd</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
        <references refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" compoundref="file_8h" startline="52">fileDescriptorStruct::offset</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_11a17e9753f6c9d2b34c35a2b2e7d240e" 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="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref> *</type>
          <declname>userFd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="49" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="49" bodyend="57"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" compoundref="file_8h" startline="68">userFileDescriptorStruct::fd</references>
        <references refid="file_8h_1ca6c1e5b57dc9f5d8551b41ea98bfbb7" compoundref="file_8c" startline="200" endline="206">fwrite</references>
        <references refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" compoundref="sched_8h" startline="66">taskStruct::term</references>
        <references refid="tty_8h_1d96f57a7c113d3cfa76ee5fed6de33c0" compoundref="tty_8c" startline="118" endline="168">tty_print</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_181e426f86ee3d066c32986948fe3f6fd" 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>const char *</type>
          <declname>path</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="436" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="436" bodyend="469"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" compoundref="sched_8h" startline="51">osInfo::cwd</references>
        <references refid="file_8h_1872c22366b4c63f4bdb10cd3b7980b11" compoundref="file_8c" startline="398" endline="425">fclose</references>
        <references refid="file_8h_1d6a41ac88a7d46d574e8a675fdde136c" compoundref="file_8c" startline="274" endline="389">fopen</references>
        <references refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="38">vfs_mountPoint::fs</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" compoundref="file_8h" startline="49">fileDescriptorStruct::mp</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
        <references refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" compoundref="sched_8h" startline="60">taskStruct::oInfo</references>
        <references refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" compoundref="kprintf_8c" startline="51" endline="58">sprintf</references>
        <references refid="lib_2string_8h_1dcec9a82a6a276e8edb0fd4fc26fe8f2" compoundref="string_8c" startline="118" endline="133">strstr</references>
        <references refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" compoundref="strtok_8c" startline="74" endline="77">strtok</references>
        <references refid="structfileSystem_120da59647c97bc603d6d447984f335d7">fileSystem::vfsMakeDir</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_16db05e27ce2d54b4d2b5202c2d4282df" 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="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="88" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="88" bodyend="90"/>
      </memberdef>
      <memberdef kind="function" id="file_8c_1331ab84f654750a2e7b3856f47be376f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void sysUnlink</definition>
        <argsstring>(const char *path, int *retVal)</argsstring>
        <name>sysUnlink</name>
        <param>
          <type>const char *</type>
          <declname>path</declname>
        </param>
        <param>
          <type>int *</type>
          <declname>retVal</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="111" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="111" bodyend="113"/>
        <references refid="file_8h_128af9471bbdf262321af663e02899a47" compoundref="file_8c" startline="480" endline="498">unlink</references>
      </memberdef>
      <memberdef kind="function" id="file_8c_1da4d877b19c34ce3137e0c35dab6e947" 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>const char *</type>
          <declname>node</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="480" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="480" bodyend="498"/>
        <references refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" compoundref="mount_8h" startline="38">vfs_mountPoint::fs</references>
        <references refid="structvfs__mountPoint_130136b0c8a7040142fefc3b3d8038eaf" compoundref="mount_8h" startline="43">vfs_mountPoint::mountPoint</references>
        <references refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="types_8h" startline="36">NULL</references>
        <references refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" compoundref="strtok_8c" startline="74" endline="77">strtok</references>
        <references refid="mount_8h_1a8cc926aa9badb781158b6738b1b0f2d" compoundref="mount_8c" startline="132" endline="142">vfs_findMount</references>
        <references refid="structfileSystem_1215822943f3048f49e56579c11ca55d7">fileSystem::vfsUnlink</references>
        <referencedby refid="file_8c_1331ab84f654750a2e7b3856f47be376f" compoundref="file_8c" startline="111" endline="113">sysUnlink</referencedby>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="file_8c_151ba4d2a5ce81ca407a9446dde21b319" prot="public" static="no" mutable="no">
        <type><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref> *</type>
        <definition>fileDescriptor* fdTable</definition>
        <argsstring></argsstring>
        <name>fdTable</name>
        <initializer> 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="45" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="45" bodyend="-1"/>
        <referencedby refid="file_8c_1789959682f4ac8df2d89ea6450efda8b" compoundref="file_8c" startline="398" endline="425">fclose</referencedby>
        <referencedby refid="file_8c_13c11b2679cf37c72b05eaab50c282e72" compoundref="file_8c" startline="274" endline="389">fopen</referencedby>
      </memberdef>
      <memberdef kind="variable" id="file_8c_1fa65d289bbbb969e9cffdb3620112989" prot="public" static="yes" mutable="no">
        <type><ref refid="spinlock_8h_1a240e9404b4ede1e0d714610080d1176" kindref="member">spinLock_t</ref></type>
        <definition>spinLock_t fdTable_lock</definition>
        <argsstring></argsstring>
        <name>fdTable_lock</name>
        <initializer> SPIN_LOCK_INITIALIZER</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" line="42" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c" bodystart="42" bodyend="-1"/>
        <referencedby refid="file_8c_1789959682f4ac8df2d89ea6450efda8b" compoundref="file_8c" startline="398" endline="425">fclose</referencedby>
        <referencedby refid="file_8c_13c11b2679cf37c72b05eaab50c282e72" compoundref="file_8c" startline="274" endline="389">fopen</referencedby>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>Copyright<sp/>(c)<sp/>2002<sp/>The<sp/>UbixOS<sp/>Project</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment">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</highlight></codeline>
<codeline lineno="6"><highlight class="comment">permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="7"><highlight class="comment"></highlight></codeline>
<codeline lineno="8"><highlight class="comment">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="9"><highlight class="comment">conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.<sp/><sp/>Redistributions<sp/>in<sp/>binary</highlight></codeline>
<codeline lineno="10"><highlight class="comment">form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of<sp/>conditions,<sp/>the<sp/>following</highlight></codeline>
<codeline lineno="11"><highlight class="comment">disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or<sp/>other<sp/>materials<sp/>provided</highlight></codeline>
<codeline lineno="12"><highlight class="comment">with<sp/>the<sp/>distribution.<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its</highlight></codeline>
<codeline lineno="13"><highlight class="comment">contributors<sp/>may<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software</highlight></codeline>
<codeline lineno="14"><highlight class="comment">without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"></highlight></codeline>
<codeline lineno="16"><highlight class="comment">THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>COPYRIGHT<sp/>HOLDERS<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY</highlight></codeline>
<codeline lineno="17"><highlight class="comment">EXPRESS<sp/>OR<sp/>IMPLIED<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="18"><highlight class="comment">MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL</highlight></codeline>
<codeline lineno="19"><highlight class="comment">THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,</highlight></codeline>
<codeline lineno="20"><highlight class="comment">SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="21"><highlight class="comment">OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)</highlight></codeline>
<codeline lineno="22"><highlight class="comment">HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR</highlight></codeline>
<codeline lineno="23"><highlight class="comment">TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS</highlight></codeline>
<codeline lineno="24"><highlight class="comment">SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="25"><highlight class="comment"></highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>$Id: file_8c.xml 88 2016-01-12 00:11:29Z reddawg $</highlight></codeline>
<codeline lineno="27"><highlight class="comment"></highlight></codeline>
<codeline lineno="28"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="vfs_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="file_8h" kindref="compound">vfs/file.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><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="33"><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="34"><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="35"><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="36"><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="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="lib_2string_8h" kindref="compound">lib/string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><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="39"><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="40"><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="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42" refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1a240e9404b4ede1e0d714610080d1176" kindref="member">spinLock_t</ref><sp/><ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref><sp/>=<sp/><ref refid="spinlock_8h_10fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref>;</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="45" refid="file_8c_151ba4d2a5ce81ca407a9446dde21b319" refkind="member"><highlight class="normal"><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*<ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>USER<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49" refid="file_8c_11a17e9753f6c9d2b34c35a2b2e7d240e" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_1fcdd895987386f8804e7ac7af37b6e7d" kindref="member">sysFwrite</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*ptr,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>size,<ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref><sp/>*userFd)<sp/>{</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tty_8h_1d96f57a7c113d3cfa76ee5fed6de33c0" kindref="member">tty_print</ref>(ptr,<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" kindref="member">term</ref>);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="file_8h_1ca6c1e5b57dc9f5d8551b41ea98bfbb7" kindref="member">fwrite</ref>(ptr,size,1,userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="59" refid="file_8c_104b3a6449e24cc27188e1f4b9a9d8225" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_16f44f7787a1f24847ae4d5dc701159df" kindref="member">sysFgetc</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*ptr,<ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref><sp/>*userFd)<sp/>{</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*tmpFd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/>tmpFd<sp/>=<sp/>userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref>;</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(1)<sp/>{</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" kindref="member">term</ref><sp/>==<sp/><ref refid="tty_8h_1afbb5679104334c34d7691b2de7d7a86" kindref="member">tty_foreground</ref>)<sp/>{</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((*ptr<sp/>=<sp/><ref refid="atkbd_8c_19e32494b8c0797b73c41a50c698f0c04" kindref="member">getch</ref>())<sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sched_8h_108933fe6d593a1c78b9080359f15a0b7" kindref="member">sched_yield</ref>();</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sched_8h_108933fe6d593a1c78b9080359f15a0b7" kindref="member">sched_yield</ref>();</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="73"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>else<sp/>{</highlight></codeline>
<codeline lineno="74"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>kprintf(&quot;Waking<sp/>Task:<sp/>%i\n&quot;,tty_foreground-&gt;owner);</highlight></codeline>
<codeline lineno="75"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sched_setStatus(tty_foreground-&gt;owner,READY);</highlight></codeline>
<codeline lineno="76"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>kprintf(&quot;Sleeping<sp/>Task:<sp/>%i\n&quot;,_current-&gt;id);</highlight></codeline>
<codeline lineno="77"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sched_setStatus(_current-&gt;id,WAIT);</highlight></codeline>
<codeline lineno="78"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sched_yield();</highlight></codeline>
<codeline lineno="79"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="80"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>ptr[0]<sp/>=<sp/>(int)<sp/><ref refid="file_8h_1dfedd6c658c329d13d5a90a7462f5979" kindref="member">fgetc</ref>(tmpFd);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88" refid="file_8c_16db05e27ce2d54b4d2b5202c2d4282df" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_16db05e27ce2d54b4d2b5202c2d4282df" kindref="member">sysRmDir</ref>()<sp/>{</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight></codeline>
<codeline lineno="92" refid="file_8c_16ff1131020b7a50805dc848fcd9c03b2" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_138bf31c893b410d0fac9399ef85ad497" kindref="member">sysFseek</ref>(<ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref><sp/>*userFd,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>offset,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>whence)<sp/>{</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO<sp/>:<sp/>coredump?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd<sp/>==<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref><sp/>==<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref><sp/>=<sp/>offset+whence;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="101"><highlight class="normal"></highlight></codeline>
<codeline lineno="102" refid="file_8c_1911a71c3e0e08149a11b2b05a50b3b97" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_1e728e0554b245825d8fbb97d1f542844" kindref="member">sysChDir</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="103"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="lib_2string_8h_1dcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(path,</highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,</highlight><highlight class="stringliteral">&quot;%s%s&quot;</highlight><highlight class="normal">,<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,path);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,path);</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111" refid="file_8c_1331ab84f654750a2e7b3856f47be376f" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_1aec6e18d80f7508900cd4e828edc0151" 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,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*retVal)<sp/>{</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/>*retVal<sp/>=<sp/><ref refid="file_8h_128af9471bbdf262321af663e02899a47" kindref="member">unlink</ref>(path);</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="116"><highlight class="comment"></highlight></codeline>
<codeline lineno="117"><highlight class="comment">Function:<sp/>void<sp/>sysFopen();</highlight></codeline>
<codeline lineno="118"><highlight class="comment">Description:<sp/>Opens<sp/>A<sp/>File<sp/>Descriptor<sp/>For<sp/>A<sp/>User<sp/>Task</highlight></codeline>
<codeline lineno="119"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="120"><highlight class="comment"></highlight></codeline>
<codeline lineno="121"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122" refid="file_8c_111af8c48fc1b1a08d97e8082d553c143" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_1f0ad6deac3d7f77820114d678741acb2" kindref="member">sysFopen</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>,</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*flags,<ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref><sp/>*userFd)<sp/>{</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd<sp/>==<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" 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">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/>userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref><sp/>=<sp/><ref refid="file_8h_1d6a41ac88a7d46d574e8a675fdde136c" kindref="member">fopen</ref>(file,flags);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref><sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/>userFd-&gt;<ref refid="structuserFileDescriptorStruct_149b5731913f50c40d0c12b8c8e89b020" kindref="member">fdSize</ref><sp/>=<sp/>userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref>-&gt;<ref refid="structfileDescriptorStruct_197eb3dcefe53610658dc341ca449e290" kindref="member">size</ref>;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="134"><highlight class="comment"></highlight></codeline>
<codeline lineno="135"><highlight class="comment">Function:<sp/>void<sp/>sysFread();</highlight></codeline>
<codeline lineno="136"><highlight class="comment">Description:<sp/>Reads<sp/>SIZE<sp/>Bytes<sp/>From<sp/>The<sp/>userFd<sp/>Into<sp/>DATA</highlight></codeline>
<codeline lineno="137"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="138"><highlight class="comment"></highlight></codeline>
<codeline lineno="139"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="140" refid="file_8c_158d31e6659ae90bb9a1a78e238110b08" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_1386959ece5e0ce3b251767f17a3829ca" kindref="member">sysFread</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*data,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>size,<ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref><sp/>*userFd)<sp/>{</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>TODO<sp/>:<sp/>coredump?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd<sp/>==<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref><sp/>==<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><ref refid="file_8h_13b06878a03209e88c008c77234b89359" kindref="member">fread</ref>(data,size,1,userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="151"><highlight class="comment"></highlight></codeline>
<codeline lineno="152"><highlight class="comment">Function:<sp/>void<sp/>sysFclse();</highlight></codeline>
<codeline lineno="153"><highlight class="comment">Description:<sp/>Closes<sp/>A<sp/>File<sp/>Descriptor<sp/>For<sp/>A<sp/>User<sp/>Task</highlight></codeline>
<codeline lineno="154"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="155"><highlight class="comment"></highlight></codeline>
<codeline lineno="156"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157" refid="file_8c_179ea7e7d939ab058bf2b53fdbfee42c6" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_144dd82b342d548f461bf69eaea24467c" kindref="member">sysFclose</ref>(<ref refid="structuserFileDescriptorStruct" kindref="compound">userFileDescriptor</ref><sp/>*userFd,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*<ref refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" kindref="member">status</ref>)<sp/>{</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd<sp/>==<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>)</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*status<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref><sp/>==<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*status<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/>*status<sp/>=<sp/><ref refid="file_8h_1872c22366b4c63f4bdb10cd3b7980b11" kindref="member">fclose</ref>(userFd-&gt;<ref refid="structuserFileDescriptorStruct_14dbfb1872dcf459d26d56e4c83916e84" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="174"><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>KERNEL<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="normal"></highlight></codeline>
<codeline lineno="178" refid="file_8c_13b06878a03209e88c008c77234b89359" refkind="member"><highlight class="normal"><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref><sp/><ref refid="file_8h_13b06878a03209e88c008c77234b89359" kindref="member">fread</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ptr,<ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref><sp/>size,<ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref><sp/>nmemb,<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd<sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="183"><highlight class="normal"></highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(nmemb<sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>nmemb<sp/>=<sp/>1;<sp/></highlight><highlight class="comment">//Temp<sp/>Fix</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd);</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>);</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>);</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/>i<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1c5639f8b5425e84b0e25b183f18dbb7a" kindref="member">vfsRead</ref>(fd,ptr,fd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref>,size<sp/>*<sp/>nmemb);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref><sp/>+=<sp/>size<sp/>*<sp/>nmemb;</highlight></codeline>
<codeline lineno="194"><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;fread:<sp/>%i:%i&quot;,i,size<sp/>*nmemb);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(i);</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="199"><highlight class="normal"></highlight></codeline>
<codeline lineno="200" refid="file_8c_1ca6c1e5b57dc9f5d8551b41ea98bfbb7" refkind="member"><highlight class="normal"><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref><sp/><ref refid="file_8h_1ca6c1e5b57dc9f5d8551b41ea98bfbb7" kindref="member">fwrite</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ptr,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>size,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nmemb,<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_10a4a469c38583399be85b1b9d63875c3" kindref="member">vfsWrite</ref>(fd,ptr,fd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref>,size<sp/>*<sp/>nmemb);</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;offset<sp/>+=<sp/>size<sp/>*<sp/>nmemb;</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="207"><highlight class="normal"></highlight></codeline>
<codeline lineno="208" refid="file_8c_19e0ce64b32581a1d0337031d9ca07dfb" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8h_180528d8335cd52755f5d6a92e4f08391" kindref="member">fseek</ref>(<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*tmpFd,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>offset,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>whence)<sp/>{</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref><sp/>=<sp/>offset+whence;</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref>);</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="214"><highlight class="comment"></highlight></codeline>
<codeline lineno="215"><highlight class="comment">Function:<sp/>int<sp/>feof(fileDescriptor<sp/>*fd)</highlight></codeline>
<codeline lineno="216"><highlight class="comment">Description:<sp/>Check<sp/>A<sp/>File<sp/>Descriptor<sp/>For<sp/>EOF<sp/>And<sp/>Return<sp/>Result</highlight></codeline>
<codeline lineno="217"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="218"><highlight class="comment"></highlight></codeline>
<codeline lineno="219"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="220" refid="file_8c_16745ded7e707449e4f248d86dc76da4f" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8h_16745ded7e707449e4f248d86dc76da4f" kindref="member">feof</ref>(<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd-&gt;<ref refid="structfileDescriptorStruct_1dd78e2b569c4813dc1b171f4203f3e6b" kindref="member">status</ref><sp/>==<sp/><ref refid="vfs_8h_14907ecb6121af1b80c5c5b436ebe3cb5" kindref="member">fdEof</ref>)<sp/>{</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(-1);</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0);</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="227"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="228"><highlight class="comment"></highlight></codeline>
<codeline lineno="229"><highlight class="comment">Function:<sp/>int<sp/>fputc(int<sp/>ch,fileDescriptor<sp/>*fd)</highlight></codeline>
<codeline lineno="230"><highlight class="comment">Description:<sp/>This<sp/>Will<sp/>Write<sp/>Character<sp/>To<sp/>FD</highlight></codeline>
<codeline lineno="231"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="232"><highlight class="comment"></highlight></codeline>
<codeline lineno="233"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="234" refid="file_8c_1c49e133f264f7aa16d63ba1f404be8ac" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8c_1c49e133f264f7aa16d63ba1f404be8ac" kindref="member">fputc</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ch,<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/>ch<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_10a4a469c38583399be85b1b9d63875c3" kindref="member">vfsWrite</ref>(fd,(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)ch,fd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref>,1);</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref>++;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(ch);</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="240"><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="241"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="244"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="245"><highlight class="comment"></highlight></codeline>
<codeline lineno="246"><highlight class="comment">Function:<sp/>int<sp/>fgetc(fileDescriptor<sp/>*fd)</highlight></codeline>
<codeline lineno="247"><highlight class="comment">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="248"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="249"><highlight class="comment"></highlight></codeline>
<codeline lineno="250"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="251" refid="file_8c_1dfedd6c658c329d13d5a90a7462f5979" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8h_1dfedd6c658c329d13d5a90a7462f5979" kindref="member">fgetc</ref>(<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ch<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="253"><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="254"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1c5639f8b5425e84b0e25b183f18dbb7a" kindref="member">vfsRead</ref>(fd,(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)&amp;ch,fd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref>,1);</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;offset++;</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(ch);</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="259"><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><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="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="263"><highlight class="normal"></highlight></codeline>
<codeline lineno="264"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="265"><highlight class="comment"></highlight></codeline>
<codeline lineno="266"><highlight class="comment">Function:<sp/>fileDescriptor<sp/>*fopen(const<sp/>char<sp/>*file,cont<sp/>char<sp/>*flags)</highlight></codeline>
<codeline lineno="267"><highlight class="comment">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="268"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="269"><highlight class="comment"></highlight></codeline>
<codeline lineno="270"><highlight class="comment">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="271"><highlight class="comment"></highlight></codeline>
<codeline lineno="272"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"></highlight></codeline>
<codeline lineno="274" refid="file_8c_13c11b2679cf37c72b05eaab50c282e72" refkind="member"><highlight class="normal"><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*<ref refid="file_8h_1d6a41ac88a7d46d574e8a675fdde136c" 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>,</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="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*path<sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*mountPoint<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fileName[1024];</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*tmpFd<sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><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="282"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((tmpFd<sp/>=<sp/>(<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*)<ref refid="kmalloc_8h_1150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref>)))<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" 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">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(<ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><ref refid="strcpy_8S_19132520cc79236b654666f4ddc1b516c" kindref="member">strcpy</ref>(fileName,file);</highlight></codeline>
<codeline lineno="288"><highlight class="normal"></highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="lib_2string_8h_1dcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(fileName,</highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/>mountPoint<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<ref refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)&amp;fileName,</highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/>path<sp/>=<sp/><ref refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,</highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/>path<sp/>=<sp/>fileName;</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/></highlight></codeline>
<codeline lineno="297"><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="298"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="strcpy_8S_19132520cc79236b654666f4ddc1b516c" kindref="member">strcpy</ref>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_14ca84ca208f0bcd97d654f99a55724f6" kindref="member">fileName</ref>,<sp/>path);</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_14ca84ca208f0bcd97d654f99a55724f6" kindref="member">fileName</ref>,</highlight><highlight class="stringliteral">&quot;/%s&quot;</highlight><highlight class="normal">,path);</highlight></codeline>
<codeline lineno="301"><highlight class="normal"></highlight></codeline>
<codeline lineno="302"><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="303"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mountPoint<sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref><sp/>=<sp/><ref refid="mount_8h_1a8cc926aa9badb781158b6738b1b0f2d" kindref="member">vfs_findMount</ref>(</highlight><highlight class="stringliteral">&quot;sys&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref><sp/>=<sp/><ref refid="mount_8h_1a8cc926aa9badb781158b6738b1b0f2d" kindref="member">vfs_findMount</ref>(mountPoint);</highlight></codeline>
<codeline lineno="307"><highlight class="normal"></highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Mount<sp/>Point<sp/>Bad\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="312"><highlight class="normal"></highlight></codeline>
<codeline lineno="313"><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="314"><highlight class="normal"><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_18c43ddd6ff5fd5383bcdde5896846e98" kindref="member">mode</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/><sp/>(i<sp/>=<sp/>0;<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal"><sp/>!=<sp/>flags[i]<sp/>;i++<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(flags[i])<sp/>{</highlight></codeline>
<codeline lineno="317"><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="318"><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="319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_18c43ddd6ff5fd5383bcdde5896846e98" kindref="member">mode</ref><sp/>|=<sp/><ref refid="vfs_8h_14898b5a1a1daebda9d11b4afde062e5c" kindref="member">fileWrite</ref>;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="321"><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="322"><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="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_18c43ddd6ff5fd5383bcdde5896846e98" kindref="member">mode</ref><sp/>|=<sp/><ref refid="vfs_8h_1e8e814536103f514b8460ec7a0fc4553" kindref="member">fileRead</ref>;</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="325"><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="326"><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="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_18c43ddd6ff5fd5383bcdde5896846e98" kindref="member">mode</ref><sp/>|=<sp/><ref refid="vfs_8h_13e8798b0a6e30da29349c1b6d827f52a" kindref="member">fileBinary</ref>;</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="329"><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="330"><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="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_18c43ddd6ff5fd5383bcdde5896846e98" kindref="member">mode</ref><sp/>|=<sp/><ref refid="vfs_8h_1e4c27d5653358d16438504434867dfff" kindref="member">fileAppend</ref>;</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" 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="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="338"><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="339"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_10fdae1689e7c9d514c635f790b11635d" kindref="member">vfsOpenFile</ref>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_14ca84ca208f0bcd97d654f99a55724f6" kindref="member">fileName</ref>,tmpFd)<sp/>==<sp/>0x1)<sp/>{</highlight></codeline>
<codeline lineno="340"><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="341"><highlight class="normal"></highlight></codeline>
<codeline lineno="342"><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"><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="344"><highlight class="normal"></highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1cbc0897e87c2c167cdb8cb1beb77f598" kindref="member">buffer</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<ref refid="kmalloc_8h_1150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(4096);</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1cbc0897e87c2c167cdb8cb1beb77f598" kindref="member">buffer</ref><sp/>==<sp/>0x0)</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd);</highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" 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">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref>);</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0x1;</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="353"><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="354"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1dd78e2b569c4813dc1b171f4203f3e6b" kindref="member">status</ref><sp/>=<sp/><ref refid="vfs_8h_1249a3d8cdfed3302062ad215b95a4294" kindref="member">fdOpen</ref>;</highlight></codeline>
<codeline lineno="355"><highlight class="normal"></highlight></codeline>
<codeline lineno="356"><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="357"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1eedbb6c79fc5a34c4b8cf4ebbf6a0658" kindref="member">offset</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" kindref="member">prev</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="359"><highlight class="normal"></highlight></codeline>
<codeline lineno="360"><highlight class="normal"><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="361"><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="362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" kindref="member">spinLock</ref>(&amp;<ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref>);</highlight></codeline>
<codeline lineno="363"><highlight class="normal"></highlight></codeline>
<codeline lineno="364"><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="365"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_14398d65a35290bc00027b6c8a4e049c8" kindref="member">openFiles</ref>++;</highlight></codeline>
<codeline lineno="366"><highlight class="normal"></highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" kindref="member">next</ref><sp/>=<sp/><ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref>;</highlight></codeline>
<codeline lineno="368"><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref><sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref>-&gt;<ref refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" kindref="member">prev</ref><sp/>=<sp/>tmpFd;</highlight></codeline>
<codeline lineno="371"><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref><sp/>=<sp/>tmpFd;</highlight></codeline>
<codeline lineno="373"><highlight class="normal"></highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref>);</highlight></codeline>
<codeline lineno="375"><highlight class="normal"></highlight></codeline>
<codeline lineno="376"><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="377"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(tmpFd);</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1cbc0897e87c2c167cdb8cb1beb77f598" kindref="member">buffer</ref>);</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd);</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref>);</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;File<sp/>Not<sp/>Found?<sp/>%s\n&quot;</highlight><highlight class="normal">,file);</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="386"><highlight class="normal"></highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>NULL<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="390"><highlight class="normal"></highlight></codeline>
<codeline lineno="391"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="392"><highlight class="comment"></highlight></codeline>
<codeline lineno="393"><highlight class="comment">Function:<sp/>int<sp/>fclose(fileDescriptor<sp/>*fd);</highlight></codeline>
<codeline lineno="394"><highlight class="comment">Description:<sp/>This<sp/>Will<sp/>Close<sp/>And<sp/>Free<sp/>A<sp/>File<sp/>Descriptor</highlight></codeline>
<codeline lineno="395"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="396"><highlight class="comment"></highlight></codeline>
<codeline lineno="397"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="398" refid="file_8c_1789959682f4ac8df2d89ea6450efda8b" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8h_1872c22366b4c63f4bdb10cd3b7980b11" kindref="member">fclose</ref>(<ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*tmpFd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd);</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" kindref="member">spinLock</ref>(&amp;<ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref>);</highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(tmpFd<sp/>=<sp/><ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref>;tmpFd<sp/>!=<sp/>0x0;tmpFd<sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd<sp/>==<sp/>fd)<sp/>{</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" kindref="member">prev</ref>)</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" kindref="member">prev</ref>-&gt;<ref refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" kindref="member">next</ref><sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" kindref="member">next</ref>)</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" kindref="member">next</ref>-&gt;<ref refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" kindref="member">prev</ref><sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_13301f80684107656eeb91edfaed9e676" kindref="member">prev</ref>;</highlight></codeline>
<codeline lineno="410"><highlight class="normal"></highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(tmpFd<sp/>==<sp/><ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref>)</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="file_8h_151ba4d2a5ce81ca407a9446dde21b319" kindref="member">fdTable</ref><sp/>=<sp/>tmpFd-&gt;<ref refid="structfileDescriptorStruct_1fe4f514afb8946b16aab3c8e50f8069c" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="413"><highlight class="normal"></highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_14398d65a35290bc00027b6c8a4e049c8" kindref="member">openFiles</ref>--;</highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref>);</highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1cbc0897e87c2c167cdb8cb1beb77f598" kindref="member">buffer</ref><sp/>!=<sp/><ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)</highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd-&gt;<ref refid="structfileDescriptorStruct_1cbc0897e87c2c167cdb8cb1beb77f598" kindref="member">buffer</ref>);</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(tmpFd);</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);<sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="file_8c_1fa65d289bbbb969e9cffdb3620112989" kindref="member">fdTable_lock</ref>);</highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0<ref refid="ap-boot_8S_11a3ac2137e21f6f0d400f1996914dd19" kindref="member">x1</ref>);</highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="426"><highlight class="normal"></highlight></codeline>
<codeline lineno="427"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>UBU<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="428"><highlight class="normal"></highlight></codeline>
<codeline lineno="429"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="430"><highlight class="comment"></highlight></codeline>
<codeline lineno="431"><highlight class="comment">Function:<sp/>void<sp/>sysMkDir(const<sp/>char<sp/>*path)</highlight></codeline>
<codeline lineno="432"><highlight class="comment">Description:<sp/>This<sp/>Will<sp/>Create<sp/>A<sp/>New<sp/>Directory</highlight></codeline>
<codeline lineno="433"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="434"><highlight class="comment"></highlight></codeline>
<codeline lineno="435"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="436" refid="file_8c_181e426f86ee3d066c32986948fe3f6fd" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="syscalls_8h_18e5c364725bc054dd66a5a50e6ac0b0c" 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="437"><highlight class="normal"><sp/><sp/><ref refid="structfileDescriptorStruct" kindref="compound">fileDescriptor</ref><sp/>*tmpFD<sp/>=<sp/>0x0;<sp/></highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>tmpDir[1024];</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>rootPath[256];</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*dir<sp/>=<sp/>0x0;</highlight><highlight class="comment">//UBU*mountPoint<sp/>=<sp/>0x0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*tmp<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/>rootPath[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/>dir<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)path;<sp/></highlight></codeline>
<codeline lineno="444"><highlight class="normal"></highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="lib_2string_8h_1dcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(path,</highlight><highlight class="stringliteral">&quot;:&quot;</highlight><highlight class="normal">)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(tmpDir,</highlight><highlight class="stringliteral">&quot;%s%s&quot;</highlight><highlight class="normal">,<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,path);</highlight></codeline>
<codeline lineno="447"><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="448"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(<ref refid="lib_2string_8h_1dcec9a82a6a276e8edb0fd4fc26fe8f2" kindref="member">strstr</ref>(dir,</highlight><highlight class="stringliteral">&quot;/&quot;</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
<codeline lineno="450"><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="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(rootPath,</highlight><highlight class="stringliteral">&quot;%s/&quot;</highlight><highlight class="normal">,<ref refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(dir,</highlight><highlight class="stringliteral">&quot;/&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1c38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(rootPath,</highlight><highlight class="stringliteral">&quot;%s%s/&quot;</highlight><highlight class="normal">,rootPath,<ref refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(dir,</highlight><highlight class="stringliteral">&quot;/&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp<sp/>=<sp/><ref refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,</highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/>dir<sp/>=<sp/>tmp;</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="457"><highlight class="normal"></highlight></codeline>
<codeline lineno="458"><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="459"><highlight class="normal"><sp/><sp/>tmpFD<sp/>=<sp/><ref refid="file_8h_1d6a41ac88a7d46d574e8a675fdde136c" kindref="member">fopen</ref>(rootPath,</highlight><highlight class="stringliteral">&quot;rb&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="460"><highlight class="normal"></highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpFD-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Invalid<sp/>Mount<sp/>Point\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/>tmpFD-&gt;<ref refid="structfileDescriptorStruct_1f8abeb5da4a430885db51246db1356f9" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_120da59647c97bc603d6d447984f335d7" kindref="member">vfsMakeDir</ref>(dir,tmpFD);</highlight></codeline>
<codeline lineno="465"><highlight class="normal"></highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><ref refid="file_8h_1872c22366b4c63f4bdb10cd3b7980b11" kindref="member">fclose</ref>(tmpFD);</highlight></codeline>
<codeline lineno="467"><highlight class="normal"></highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="470"><highlight class="normal"></highlight></codeline>
<codeline lineno="471"><highlight class="normal"></highlight></codeline>
<codeline lineno="472"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="473"><highlight class="comment"></highlight></codeline>
<codeline lineno="474"><highlight class="comment">Function:<sp/>int<sp/>unlink(const<sp/>char<sp/>*node)</highlight></codeline>
<codeline lineno="475"><highlight class="comment">Description:<sp/>This<sp/>will<sp/>unlink<sp/>a<sp/>file</highlight></codeline>
<codeline lineno="476"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="477"><highlight class="comment"></highlight></codeline>
<codeline lineno="478"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="479"><highlight class="normal"></highlight></codeline>
<codeline lineno="480" refid="file_8c_1da4d877b19c34ce3137e0c35dab6e947" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="file_8h_128af9471bbdf262321af663e02899a47" 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="481"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*path<sp/>=<sp/>0x0,*mountPoint<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="482"><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="483"><highlight class="normal"></highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/>path<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<ref refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)node,</highlight><highlight class="stringliteral">&quot;@&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><ref refid="structvfs__mountPoint_130136b0c8a7040142fefc3b3d8038eaf" kindref="member">mountPoint</ref><sp/>=<sp/><ref refid="lib_2string_8h_19af7251f0c1b875e0e34b8e2b94dda39" kindref="member">strtok</ref>(<ref refid="types_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,</highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structvfs__mountPoint_130136b0c8a7040142fefc3b3d8038eaf" kindref="member">mountPoint</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/>mp<sp/>=<sp/><ref refid="mount_8h_1a8cc926aa9badb781158b6738b1b0f2d" 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="488"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/>mp<sp/>=<sp/><ref refid="mount_8h_1a8cc926aa9badb781158b6738b1b0f2d" kindref="member">vfs_findMount</ref>(<ref refid="structvfs__mountPoint_130136b0c8a7040142fefc3b3d8038eaf" kindref="member">mountPoint</ref>);</highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mp<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="493"><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="494"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="496"><highlight class="normal"><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1654fe61c60a0044082a7651cb2e29b8e" kindref="member">fs</ref>-&gt;<ref refid="structfileSystem_1215822943f3048f49e56579c11ca55d7" kindref="member">vfsUnlink</ref>(path,mp);</highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="498"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="499"><highlight class="normal"></highlight></codeline>
<codeline lineno="500"><highlight class="normal"></highlight></codeline>
<codeline lineno="501"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="502"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="503"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="504"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/usr/home/reddawg/source/ubix2/src/sys/vfs/file.c"/>
  </compounddef>
</doxygen>
