Newer
Older
UbixOS / doc / xml / ubixfs_8c.xml
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="ubixfs_8c" kind="file" language="C++">
    <compoundname>ubixfs.c</compoundname>
    <includes refid="include_2ubixfs_2ubixfs_8h" local="no">ubixfs/ubixfs.h</includes>
    <includes refid="dirCache_8h" local="no">ubixfs/dirCache.h</includes>
    <includes refid="include_2vfs_2vfs_8h" local="no">vfs/vfs.h</includes>
    <includes refid="sched_8h" local="no">ubixos/sched.h</includes>
    <includes refid="kpanic_8h" local="no">ubixos/kpanic.h</includes>
    <includes refid="exec_8h" local="no">ubixos/exec.h</includes>
    <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="assert_8h" local="no">assert.h</includes>
    <incdepgraph>
      <node id="22">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
      </node>
      <node id="36">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="37">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="52">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="34">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="43">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
      </node>
      <node id="51">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>net/net.h</label>
        <link refid="net_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="56">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="48">
        <label>net/priv/memp_priv.h</label>
        <link refid="memp__priv_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="18">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="49">
        <label>mpi/mpi.h</label>
        <link refid="mpi_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
      </node>
      <node id="32">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="33" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>ubixfs/ubixfs.h</label>
        <link refid="include_2ubixfs_2ubixfs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="54">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="45">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
      </node>
      <node id="44">
        <label>net/stats.h</label>
        <link refid="stats_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>vfs/vfs.h</label>
        <link refid="include_2vfs_2vfs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="24">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>sys/trap.h</label>
        <link refid="trap_8h"/>
        <childnode refid="15" relation="include">
        </childnode>
      </node>
      <node id="55">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="53">
        <label>ubixos/exec.h</label>
        <link refid="exec_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
      </node>
      <node id="40">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="32" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
      </node>
      <node id="21">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="57">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="16">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="19">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="42">
        <label>net/ip6_addr.h</label>
        <link refid="ip6__addr_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
      </node>
      <node id="35">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
      </node>
      <node id="30">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
      </node>
      <node id="41">
        <label>net/ip4_addr.h</label>
        <link refid="ip4__addr_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
      </node>
      <node id="39">
        <label>net/ip_addr.h</label>
        <link refid="ip__addr_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c</label>
        <link refid="ubixfs_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="54" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
      </node>
      <node id="47">
        <label>net/priv/memp_std.h</label>
        <link refid="memp__std_8h"/>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="33">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
      </node>
      <node id="50">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="51" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="38">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="23">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="25">
        <label>sys/sysproto_posix.h</label>
        <link refid="sysproto__posix_8h"/>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="46">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="ubixfs_8c_1a3ddb724de0725144b5d358c39199ed42" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int openFileUbixFS</definition>
        <argsstring>(const char *file, fileDescriptor_t *fd)</argsstring>
        <name>openFileUbixFS</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>file</declname>
        </param>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="44" column="12" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="44" bodyend="114"/>
      </memberdef>
      <memberdef kind="function" id="ubixfs_8c_1acbf342e4662a8d4904cdb627dc995822" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int readUbixFS</definition>
        <argsstring>(fileDescriptor_t *fd, char *data, uInt32 offset, long size)</argsstring>
        <name>readUbixFS</name>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>data</declname>
        </param>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>offset</declname>
        </param>
        <param>
          <type>long</type>
          <declname>size</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="192" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="192" bodyend="220"/>
        <references refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" compoundref="shell_8c" startline="47">buffer</references>
        <references refid="structfileDescriptor_1a3f92f1984ec809932dcc57d98ea0f2b3" compoundref="include_2vfs_2file_8h" startline="75">fileDescriptor::cacheNode</references>
        <references refid="include_2vfs_2vfs_8h_1a4907ecb6121af1b80c5c5b436ebe3cb5" compoundref="include_2vfs_2vfs_8h" startline="47">fdEof</references>
        <references refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" compoundref="mount_8h" startline="72">vfs_mountPoint::fsInfo</references>
        <references refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" compoundref="dirCache_8h" startline="42">cacheNode::info</references>
        <references refid="armv6_2kpanic_8c_1adb9a182aa071791a306163d50d653deb" compoundref="armv6_2kpanic_8c" startline="41" endline="61">kpanic</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structcacheNode_1a8b26b1b3dbe3f8cb72627e09e6c8e353" compoundref="dirCache_8h" startline="44">cacheNode::present</references>
        <references refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" compoundref="include_2vfs_2file_8h" startline="70">fileDescriptor::size</references>
        <references refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" compoundref="include_2vfs_2file_8h" startline="67">fileDescriptor::status</references>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a58993494728ce5af573cd51322735210" compoundref="directory_8c" startline="64" endline="89">addDirEntry</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a1d4159e0eb816b6b23c214d7c601dcb4" compoundref="ubixfs_8c" startline="450" endline="474">ubixfs_init</referencedby>
      </memberdef>
      <memberdef kind="function" id="ubixfs_8c_1a1d4159e0eb816b6b23c214d7c601dcb4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int ubixfs_init</definition>
        <argsstring>()</argsstring>
        <name>ubixfs_init</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="450" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="450" bodyend="474"/>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="ubixfs_8c_1acbf342e4662a8d4904cdb627dc995822" compoundref="ubixfs_8c" startline="192" endline="220">readUbixFS</references>
        <references refid="ubixfs_8c_1a32762e2563015d124909f3317c2a7423" compoundref="ubixfs_8c" startline="371" endline="437">ubixfs_initialize</references>
        <references refid="ubixfs_8c_1ab4c558016c9b29b63d6f8c8ba5fe7384" compoundref="ubixfs_8c" startline="229" endline="304">writeUbixFS</references>
      </memberdef>
      <memberdef kind="function" id="ubixfs_8c_1a32762e2563015d124909f3317c2a7423" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int ubixfs_initialize</definition>
        <argsstring>(struct vfs_mountPoint *mp)</argsstring>
        <name>ubixfs_initialize</name>
        <param>
          <type>struct <ref refid="structvfs__mountPoint" kindref="compound">vfs_mountPoint</ref> *</type>
          <declname>mp</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="371" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="371" bodyend="437"/>
        <references refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structcacheNode_1a76defc9430363558ce5a96f72fa7b1d4" compoundref="dirCache_8h" startline="47">cacheNode::attributes</references>
        <references refid="structubixFSInfo_1a4f530e266f49e0310c763653399dafa2" compoundref="include_2ubixfs_2ubixfs_8h" startline="128">ubixFSInfo::batEntries</references>
        <references refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" compoundref="include_2ubixfs_2ubixfs_8h" startline="126">ubixFSInfo::blockAllocationTable</references>
        <references refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" compoundref="mount_8h" startline="70">vfs_mountPoint::device</references>
        <references refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" compoundref="include_2sys_2device_8h" startline="37">device_node::devInfo</references>
        <references refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" compoundref="include_2ubixfs_2ubixfs_8h" startline="127">ubixFSInfo::dirCache</references>
        <references refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" compoundref="mount_8h" startline="71">vfs_mountPoint::diskLabel</references>
        <references refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" compoundref="mount_8h" startline="72">vfs_mountPoint::fsInfo</references>
        <references refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" compoundref="dirCache_8h" startline="42">cacheNode::info</references>
        <references refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" compoundref="include_2sys_2device_8h" startline="51">device_interface::info</references>
        <references refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" compoundref="kmalloc_8c" startline="241" endline="331">kmalloc</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structubixDiskLabel_1a2eea14a0546c7de19d53b3784e623463" compoundref="include_2ubixfs_2ubixfs_8h" startline="68">ubixDiskLabel::magicNum</references>
        <references refid="structubixDiskLabel_1a95fd8a0ea36a8b3de597b92c8ebe0dce" compoundref="include_2ubixfs_2ubixfs_8h" startline="69">ubixDiskLabel::magicNum2</references>
        <references refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" compoundref="mount_8h" startline="73">vfs_mountPoint::partition</references>
        <references refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f">ubixDiskLabel::partitions</references>
        <references refid="structubixDiskLabel_1_1ubixPartitions_1a6a02392928bd127ff780dd656dc88203" compoundref="include_2ubixfs_2ubixfs_8h" startline="76">ubixDiskLabel::ubixPartitions::pBatSize</references>
        <references refid="structcacheNode_1a1eccf5ffd0b1a3479e0e630373cff5af" compoundref="dirCache_8h" startline="48">cacheNode::permissions</references>
        <references refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" compoundref="include_2ubixfs_2ubixfs_8h" startline="74">ubixDiskLabel::ubixPartitions::pOffset</references>
        <references refid="structcacheNode_1a8b26b1b3dbe3f8cb72627e09e6c8e353" compoundref="dirCache_8h" startline="44">cacheNode::present</references>
        <references refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" compoundref="include_2sys_2device_8h" startline="52">device_interface::read</references>
        <references refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" compoundref="include_2ubixfs_2ubixfs_8h" startline="92">blockAllocationTableEntry::realSector</references>
        <references refid="structubixFSInfo_1a8c58076e25df4115ed42bebce08d5181" compoundref="include_2ubixfs_2ubixfs_8h" startline="129">ubixFSInfo::rootDir</references>
        <references refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" compoundref="dirCache_8h" startline="43">cacheNode::size</references>
        <references refid="structcacheNode_1aa3fa99dfac99663d5448d74594120521" compoundref="dirCache_8h" startline="46">cacheNode::startCluster</references>
        <references refid="include_2ubixfs_2ubixfs_8h_1a1b1ab97d6d5dfbfb20f0f80d7c625941" compoundref="include_2ubixfs_2ubixfs_8h" startline="41">UBIXDISKMAGIC</references>
        <references refid="dirCache_8c_1a169a7d814e5ab80f123e5193a81b70b2" compoundref="dirCache_8c" startline="193" endline="207">ubixfs_cacheNew</references>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a1d4159e0eb816b6b23c214d7c601dcb4" compoundref="ubixfs_8c" startline="450" endline="474">ubixfs_init</referencedby>
      </memberdef>
      <memberdef kind="function" id="ubixfs_8c_1a8d6bb083a30346334e51b862c84f6670" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int ubixfs_loadData</definition>
        <argsstring>(fileDescriptor_t *fd, char *data, uInt32 size, uInt32 batIndex)</argsstring>
        <name>ubixfs_loadData</name>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>data</declname>
        </param>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>size</declname>
        </param>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>batIndex</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="337" column="12" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="337" bodyend="360" declfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" declline="41" declcolumn="12"/>
      </memberdef>
      <memberdef kind="function" id="ubixfs_8c_1adfbafb62e063e24f4df09029862ba9d0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void ubixFSUnlink</definition>
        <argsstring>(char *path, struct vfs_mountPoint *mp)</argsstring>
        <name>ubixFSUnlink</name>
        <param>
          <type>char *</type>
          <declname>path</declname>
        </param>
        <param>
          <type>struct <ref refid="structvfs__mountPoint" kindref="compound">vfs_mountPoint</ref> *</type>
          <declname>mp</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="306" column="6" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="306" bodyend="323"/>
      </memberdef>
      <memberdef kind="function" id="ubixfs_8c_1a65f42c9b6ca7c526642fa1c168272b03" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int writeFileByte</definition>
        <argsstring>(int ch, fileDescriptor_t *fd, long offset)</argsstring>
        <name>writeFileByte</name>
        <param>
          <type>int</type>
          <declname>ch</declname>
        </param>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <param>
          <type>long</type>
          <declname>offset</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="116" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="116" bodyend="187"/>
        <references refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structblockAllocationTableEntry_1ab650496bc3011796ef8b6897f424601c" compoundref="include_2ubixfs_2ubixfs_8h" startline="91">blockAllocationTableEntry::attributes</references>
        <references refid="structubixFSInfo_1a4f530e266f49e0310c763653399dafa2" compoundref="include_2ubixfs_2ubixfs_8h" startline="128">ubixFSInfo::batEntries</references>
        <references refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" compoundref="include_2ubixfs_2ubixfs_8h" startline="126">ubixFSInfo::blockAllocationTable</references>
        <references refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" compoundref="include_2vfs_2file_8h" startline="74">fileDescriptor::buffer</references>
        <references refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" compoundref="mount_8h" startline="70">vfs_mountPoint::device</references>
        <references refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" compoundref="include_2sys_2device_8h" startline="37">device_node::devInfo</references>
        <references refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" compoundref="mount_8h" startline="71">vfs_mountPoint::diskLabel</references>
        <references refid="include_2vfs_2vfs_8h_1a249a3d8cdfed3302062ad215b95a4294" compoundref="include_2vfs_2vfs_8h" startline="45">fdOpen</references>
        <references refid="include_2vfs_2vfs_8h_1aa461f4419baab36cdd1143cd0fe66e0e" compoundref="include_2vfs_2vfs_8h" startline="46">fdRead</references>
        <references refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" compoundref="include_2vfs_2file_8h" startline="73">fileDescriptor::fileName</references>
        <references refid="structdirectoryEntry_1a61e77c256eaf6c4e7fe56d2574f16f98" compoundref="include_2ubixfs_2ubixfs_8h" startline="107">directoryEntry::fileName</references>
        <references refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" compoundref="mount_8h" startline="72">vfs_mountPoint::fsInfo</references>
        <references refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" compoundref="include_2sys_2device_8h" startline="51">device_interface::info</references>
        <references refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" compoundref="kmalloc_8c" startline="342" endline="382">kfree</references>
        <references refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" compoundref="kmalloc_8c" startline="241" endline="331">kmalloc</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" compoundref="include_2ubixfs_2ubixfs_8h" startline="93">blockAllocationTableEntry::nextBlock</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" compoundref="mount_8h" startline="73">vfs_mountPoint::partition</references>
        <references refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f">ubixDiskLabel::partitions</references>
        <references refid="structubixDiskLabel_1_1ubixPartitions_1a6a02392928bd127ff780dd656dc88203" compoundref="include_2ubixfs_2ubixfs_8h" startline="76">ubixDiskLabel::ubixPartitions::pBatSize</references>
        <references refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" compoundref="include_2ubixfs_2ubixfs_8h" startline="74">ubixDiskLabel::ubixPartitions::pOffset</references>
        <references refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" compoundref="include_2sys_2device_8h" startline="52">device_interface::read</references>
        <references refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" compoundref="include_2ubixfs_2ubixfs_8h" startline="92">blockAllocationTableEntry::realSector</references>
        <references refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" compoundref="include_2vfs_2file_8h" startline="70">fileDescriptor::size</references>
        <references refid="structdirectoryEntry_1a9571030f709f6926b925e552660a65ab" compoundref="include_2ubixfs_2ubixfs_8h" startline="100">directoryEntry::size</references>
        <references refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" compoundref="include_2vfs_2file_8h" startline="72">fileDescriptor::start</references>
        <references refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" compoundref="include_2vfs_2file_8h" startline="67">fileDescriptor::status</references>
        <references refid="string_8h_1a6f3dcb20ff11ff9db5904c3cfb61a38c">strcmp</references>
        <references refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" compoundref="include_2sys_2device_8h" startline="53">device_interface::write</references>
      </memberdef>
      <memberdef kind="function" id="ubixfs_8c_1ab4c558016c9b29b63d6f8c8ba5fe7384" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int writeUbixFS</definition>
        <argsstring>(fileDescriptor_t *fd, char *data, long offset, long size)</argsstring>
        <name>writeUbixFS</name>
        <param>
          <type><ref refid="include_2vfs_2file_8h_1acc7b57f2d3766b4977ebbe64aa38608b" kindref="member">fileDescriptor_t</ref> *</type>
          <declname>fd</declname>
        </param>
        <param>
          <type>char *</type>
          <declname>data</declname>
        </param>
        <param>
          <type>long</type>
          <declname>offset</declname>
        </param>
        <param>
          <type>long</type>
          <declname>size</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" line="229" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c" bodystart="229" bodyend="304"/>
        <references refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" compoundref="include_2ubixfs_2ubixfs_8h" startline="126">ubixFSInfo::blockAllocationTable</references>
        <references refid="include_2ubixfs_2ubixfs_8h_1ad4eebb29e7c75230c032b1e6f71e061d" compoundref="include_2ubixfs_2ubixfs_8h" startline="43">blockSize</references>
        <references refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" compoundref="include_2vfs_2file_8h" startline="74">fileDescriptor::buffer</references>
        <references refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" compoundref="mount_8h" startline="70">vfs_mountPoint::device</references>
        <references refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" compoundref="include_2sys_2device_8h" startline="37">device_node::devInfo</references>
        <references refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" compoundref="mount_8h" startline="71">vfs_mountPoint::diskLabel</references>
        <references refid="include_2ubixfs_2ubixfs_8h_1a9c66702437ce6449d7886b4dbaad3c02" compoundref="include_2ubixfs_2ubixfs_8h" startline="45">EOBC</references>
        <references refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" compoundref="include_2vfs_2file_8h" startline="73">fileDescriptor::fileName</references>
        <references refid="structdirectoryEntry_1a61e77c256eaf6c4e7fe56d2574f16f98" compoundref="include_2ubixfs_2ubixfs_8h" startline="107">directoryEntry::fileName</references>
        <references refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" compoundref="mount_8h" startline="72">vfs_mountPoint::fsInfo</references>
        <references refid="block_8c_1aa74ff712a9d02bb08f6421ce73358654" compoundref="block_8c" startline="95" endline="123">getFreeBlocks</references>
        <references refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" compoundref="include_2sys_2device_8h" startline="51">device_interface::info</references>
        <references refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" compoundref="kmalloc_8c" startline="342" endline="382">kfree</references>
        <references refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" compoundref="kmalloc_8c" startline="241" endline="331">kmalloc</references>
        <references refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" compoundref="include_2vfs_2file_8h" startline="65">fileDescriptor::mp</references>
        <references refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" compoundref="include_2ubixfs_2ubixfs_8h" startline="93">blockAllocationTableEntry::nextBlock</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" compoundref="mount_8h" startline="73">vfs_mountPoint::partition</references>
        <references refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f">ubixDiskLabel::partitions</references>
        <references refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" compoundref="include_2ubixfs_2ubixfs_8h" startline="74">ubixDiskLabel::ubixPartitions::pOffset</references>
        <references refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" compoundref="include_2sys_2device_8h" startline="52">device_interface::read</references>
        <references refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" compoundref="include_2ubixfs_2ubixfs_8h" startline="92">blockAllocationTableEntry::realSector</references>
        <references refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" compoundref="include_2vfs_2file_8h" startline="70">fileDescriptor::size</references>
        <references refid="structdirectoryEntry_1a9571030f709f6926b925e552660a65ab" compoundref="include_2ubixfs_2ubixfs_8h" startline="100">directoryEntry::size</references>
        <references refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" compoundref="include_2vfs_2file_8h" startline="72">fileDescriptor::start</references>
        <references refid="structdirectoryEntry_1a83e91977e7db1dc36d3e81183ac8965c" compoundref="include_2ubixfs_2ubixfs_8h" startline="99">directoryEntry::startCluster</references>
        <references refid="string_8h_1a6f3dcb20ff11ff9db5904c3cfb61a38c">strcmp</references>
        <references refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" compoundref="include_2sys_2device_8h" startline="53">device_interface::write</references>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a58993494728ce5af573cd51322735210" compoundref="directory_8c" startline="64" endline="89">addDirEntry</referencedby>
        <referencedby refid="include_2ubixfs_2ubixfs_8h_1a1d4159e0eb816b6b23c214d7c601dcb4" compoundref="ubixfs_8c" startline="450" endline="474">ubixfs_init</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-2004<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"><sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>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"><sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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"><sp/>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:<sp/>ubixfs.c<sp/>79<sp/>2016-01-11<sp/>16:21:27Z<sp/>reddawg<sp/>$</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="include_2ubixfs_2ubixfs_8h" kindref="compound">ubixfs/ubixfs.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="dirCache_8h" kindref="compound">ubixfs/dirCache.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="include_2vfs_2vfs_8h" kindref="compound">vfs/vfs.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><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="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="exec_8h" kindref="compound">ubixos/exec.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="string_8h" kindref="compound">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="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><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="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Static<sp/>defines<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ubixfs_loadData(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd,</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data,<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>size,<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>batIndex);</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>openFileUbixFS(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="structfile" kindref="compound">file</ref>,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//int<sp/>x<sp/>=<sp/>0;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>mji<sp/><sp/>struct<sp/>directoryEntry<sp/>*dirEntry<sp/>=<sp/>(struct<sp/>directoryEntry<sp/>*)kmalloc(0x4000);<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structcacheNode" kindref="compound">cacheNode</ref><sp/>*<sp/><ref refid="structcacheNode" kindref="compound">cacheNode</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//struct<sp/>directoryEntry<sp/>*<sp/>dirEntry<sp/>=<sp/>NULL;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*fsInfo<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>;</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>kprintf(&quot;openFileUbixFS(%s),<sp/>cwd:<sp/>%s\n&quot;,<sp/>file,<sp/>_current-&gt;oInfo.cwd);<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="comment">//if<sp/>(fsInfo-&gt;dirCache<sp/>==<sp/>NULL)<sp/>kprintf(&quot;dirCache<sp/>is<sp/>null!\n&quot;);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd);</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>);</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>);</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>);</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fsInfo);</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structfile" kindref="compound">file</ref>);</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((fd-&gt;<ref refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" kindref="member">mode</ref><sp/>&amp;<sp/><ref refid="include_2vfs_2vfs_8h_1ae8e814536103f514b8460ec7a0fc4553" kindref="member">fileRead</ref>)<sp/>==<sp/><ref refid="include_2vfs_2vfs_8h_1ae8e814536103f514b8460ec7a0fc4553" kindref="member">fileRead</ref>)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structcacheNode" kindref="compound">cacheNode</ref><sp/>=<sp/><ref refid="dirCache_8c_1a569466a2e1237cf70320144d3de976c6" kindref="member">ubixfs_cacheFind</ref>(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>,(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="structfile" kindref="compound">file</ref>);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structcacheNode" kindref="compound">cacheNode</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a8b26b1b3dbe3f8cb72627e09e6c8e353" kindref="member">present</ref><sp/>==<sp/>1)<sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref>);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref><sp/>!=<sp/>0<sp/>&amp;&amp;<sp/><ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" kindref="member">info</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(&quot;caching<sp/>name(size):<sp/>%s(%d)\n&quot;,cacheNode-&gt;name,*cacheNode-&gt;size);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" kindref="member">info</ref><sp/>=<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(<ref refid="include_2ubixfs_2ubixfs_8h_1abd7a711afb8ae672c3e08a9308d06c5b" kindref="member">UBIXFS_ALIGN</ref>(*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref>));</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref><sp/>=<sp/>*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref>;<sp/></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1aa3fa99dfac99663d5448d74594120521" kindref="member">startCluster</ref>);</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ubixfs_loadData(fd,</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" kindref="member">info</ref>,</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref>,</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1aa3fa99dfac99663d5448d74594120521" kindref="member">startCluster</ref>);</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a8b26b1b3dbe3f8cb72627e09e6c8e353" kindref="member">present</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(1);</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="structcacheNode" kindref="compound">cacheNode</ref>);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structcacheNode" kindref="compound">cacheNode</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;<sp/></highlight><highlight class="comment">/*<sp/>this<sp/>should<sp/>be<sp/>caught<sp/>above<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" kindref="member">start</ref><sp/><sp/><sp/><sp/>=<sp/>*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1aa3fa99dfac99663d5448d74594120521" kindref="member">startCluster</ref>;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref><sp/><sp/><sp/><sp/><sp/>=<sp/>*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref>;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1aaf1c61f69cb312867bcdf95896a74bdc" kindref="member">perms</ref><sp/><sp/><sp/><sp/>=<sp/>*<ref refid="structcacheNode" kindref="compound">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a1eccf5ffd0b1a3479e0e630373cff5af" kindref="member">permissions</ref>;</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a3f92f1984ec809932dcc57d98ea0f2b3" kindref="member">cacheNode</ref><sp/>=<sp/><ref refid="structcacheNode" kindref="compound">cacheNode</ref>;<sp/></highlight><highlight class="comment">/*<sp/>Directory<sp/>Start<sp/>Sector<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="93"><highlight class="comment"><sp/><sp/><sp/><sp/>if<sp/>(cacheNode-&gt;size<sp/>!=<sp/>0x0<sp/>&amp;&amp;<sp/>cacheNode-&gt;info<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
<codeline lineno="94"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>cacheNode-&gt;info<sp/>=<sp/>kmalloc(UBIXFS_ALIGN(*cacheNode-&gt;size));</highlight></codeline>
<codeline lineno="95"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>ubixfs_loadData(fd,cacheNode-&gt;info,cacheNode-&gt;size,cacheNode-&gt;startCluster);</highlight></codeline>
<codeline lineno="96"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>cacheNode-&gt;present<sp/>=<sp/>0x1;</highlight></codeline>
<codeline lineno="97"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="98"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x1);</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/>}<sp/></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((fd-&gt;<ref refid="structfileDescriptor_1ac26434565d08e7590265288cf9e9f212" kindref="member">mode</ref><sp/>&amp;<sp/><ref refid="include_2vfs_2vfs_8h_1a4898b5a1a1daebda9d11b4afde062e5c" kindref="member">fileWrite</ref>)<sp/>==<sp/><ref refid="include_2vfs_2vfs_8h_1a4898b5a1a1daebda9d11b4afde062e5c" kindref="member">fileWrite</ref>)<sp/>{</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Ouch!<sp/>in<sp/>filewrite!\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>0</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" kindref="member">start</ref><sp/><sp/><sp/><sp/>=<sp/>dirEntry-&gt;startCluster;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref><sp/><sp/><sp/><sp/><sp/>=<sp/>dirEntry-&gt;size;</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1aaf1c61f69cb312867bcdf95896a74bdc" kindref="member">perms</ref><sp/><sp/><sp/><sp/>=<sp/>dirEntry-&gt;permissions;</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>fd-&gt;dirBlock<sp/>=<sp/>0x0;<sp/>/*<sp/>Directory<sp/>Start<sp/>Sector<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x1);</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="116" refid="include_2ubixfs_2ubixfs_8h_1a65f42c9b6ca7c526642fa1c168272b03" refkind="member"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ubixfs_8c_1a65f42c9b6ca7c526642fa1c168272b03" kindref="member">writeFileByte</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ch,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>offset)<sp/>{</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>blockCount<sp/>=<sp/>0x0,batIndex<sp/>=<sp/>0x0,batIndexPrev<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref><sp/>*dirEntry<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*fsInfo<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/>batIndexPrev<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" kindref="member">start</ref>;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/>fsInfo<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>;</highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Find<sp/>Out<sp/>How<sp/>Many<sp/>Blocks<sp/>Long<sp/>This<sp/>File<sp/>Is<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/>blockCount<sp/>=<sp/>(offset/4096);</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Find<sp/>The<sp/>Block<sp/>If<sp/>It<sp/>Doesn&apos;t<sp/>Exist<sp/>We<sp/>Will<sp/>Have<sp/>To<sp/>Allocate<sp/>One<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0x0;<sp/>i<sp/>&lt;=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1a6a02392928bd127ff780dd656dc88203" kindref="member">pBatSize</ref>;</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/>batIndex<sp/>=<sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndexPrev].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref>;</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(batIndex<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/>batIndexPrev<sp/>=<sp/>batIndex;</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((offset%4096<sp/>==<sp/>0)<sp/>&amp;&amp;<sp/>(fd-&gt;<ref refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" kindref="member">status</ref><sp/>==<sp/><ref refid="include_2vfs_2vfs_8h_1aa461f4419baab36cdd1143cd0fe66e0e" kindref="member">fdRead</ref>))<sp/>{</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" kindref="member">status</ref><sp/>=<sp/><ref refid="include_2vfs_2vfs_8h_1a249a3d8cdfed3302062ad215b95a4294" kindref="member">fdOpen</ref>;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>batIndex<sp/>==<sp/>0x0<sp/>Then<sp/>We<sp/>Must<sp/>Allocate<sp/>A<sp/>New<sp/>Block<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(batIndex<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=1;i<sp/>&lt;<sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a4f530e266f49e0310c763653399dafa2" kindref="member">batEntries</ref>;i++)<sp/>{</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[i].<ref refid="structblockAllocationTableEntry_1ab650496bc3011796ef8b6897f424601c" kindref="member">attributes</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndexPrev].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref><sp/>=<sp/>i;</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndex].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref><sp/><sp/><sp/><sp/><sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>batIndex<sp/><sp/>=<sp/>i;</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" kindref="member">start</ref><sp/>=<sp/>i;</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>fd-&gt;mp-&gt;drive-&gt;read(fd-&gt;mp-&gt;drive-&gt;driveInfoStruct,diskLabel-&gt;partitions[0].pOffset+blockAllocationTable[batIndex].realSector,8,fd-&gt;buffer);<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>[offset-(blockCount*4096)]<sp/>=<sp/>ch;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" kindref="member">write</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,8);</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd-&gt;<ref refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" kindref="member">status</ref><sp/>!=<sp/><ref refid="include_2vfs_2vfs_8h_1aa461f4419baab36cdd1143cd0fe66e0e" kindref="member">fdRead</ref>)<sp/>{<sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,8);</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" kindref="member">status</ref><sp/>=<sp/><ref refid="include_2vfs_2vfs_8h_1aa461f4419baab36cdd1143cd0fe66e0e" kindref="member">fdRead</ref>;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>[offset-(blockCount*4096)]<sp/>=<sp/>ch;</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" kindref="member">write</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,8);</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)offset<sp/>&gt;<sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref>)<sp/>{</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref><sp/>=<sp/>offset;</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/>dirEntry<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref><sp/>*)<ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(4096);</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="175"><highlight class="comment"><sp/><sp/><sp/><sp/>fd-&gt;mp-&gt;device-&gt;devInfo-&gt;read(fd-&gt;mp-&gt;device-&gt;devInfo-&gt;info,dirEntry,(fd-&gt;mp-&gt;diskLabel-&gt;partitions[fd-&gt;mp-&gt;partition].pOffset+fsInfo-&gt;blockAllocationTable[fd-&gt;dirBlock].realSector),8);</highlight></codeline>
<codeline lineno="176"><highlight class="comment"><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0x0;i&lt;(4096/</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref>));i++)<sp/>{</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)!<ref refid="string_8h_1a6f3dcb20ff11ff9db5904c3cfb61a38c" kindref="member">strcmp</ref>(dirEntry[i].<ref refid="structdirectoryEntry_1a61e77c256eaf6c4e7fe56d2574f16f98" kindref="member">fileName</ref>,fd-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>))</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/><sp/></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/>dirEntry[i].<ref refid="structdirectoryEntry_1a9571030f709f6926b925e552660a65ab" kindref="member">size</ref><sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref>;</highlight></codeline>
<codeline lineno="182"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="183"><highlight class="comment"><sp/><sp/><sp/><sp/>fd-&gt;mp-&gt;device-&gt;devInfo-&gt;write(fd-&gt;mp-&gt;device-&gt;devInfo-&gt;info,dirEntry,(fd-&gt;mp-&gt;diskLabel-&gt;partitions[fd-&gt;mp-&gt;partition].pOffset+fsInfo-&gt;blockAllocationTable[fd-&gt;dirBlock].realSector),8);</highlight></codeline>
<codeline lineno="184"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(dirEntry);</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(ch);</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="189"><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Verified<sp/>Functions<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight></codeline>
<codeline lineno="192" refid="include_2ubixfs_2ubixfs_8h_1a6b56b9893c2a4b04598034085d8cee8c" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="193"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ubixfs_8c_1acbf342e4662a8d4904cdb627dc995822" kindref="member">readUbixFS</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd,</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data,<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>offset,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="structdirectoryEntry_1a9571030f709f6926b925e552660a65ab" kindref="member">size</ref>)<sp/>{</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*fsInfo<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="197"><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd);</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>);</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>);</highlight></codeline>
<codeline lineno="201"><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/>fsInfo<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>;</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd-&gt;<ref refid="structfileDescriptor_1a3f92f1984ec809932dcc57d98ea0f2b3" kindref="member">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a8b26b1b3dbe3f8cb72627e09e6c8e353" kindref="member">present</ref><sp/>!=<sp/>1)<sp/></highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2kpanic_8c_1adb9a182aa071791a306163d50d653deb" kindref="member">kpanic</ref>(</highlight><highlight class="stringliteral">&quot;ERROR<sp/>with<sp/>cache<sp/>node\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)fd-&gt;<ref refid="structfileDescriptor_1a3f92f1984ec809932dcc57d98ea0f2b3" kindref="member">cacheNode</ref>-&gt;<ref refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" kindref="member">info</ref>;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/>for<sp/>(i=0x0;<sp/>i&lt;size;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(offset<sp/>&gt;<sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref>)<sp/>{</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>File<sp/>EOF<sp/>If<sp/>There<sp/>Is<sp/>Nothing<sp/>To<sp/>Do<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>data[i]<sp/>=<sp/>&apos;\0&apos;;<sp/>Is<sp/>this<sp/>safe?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1af40ff967ca5d88ce941ddec987d45ec7" kindref="member">status</ref><sp/>=<sp/><ref refid="include_2vfs_2vfs_8h_1a4907ecb6121af1b80c5c5b436ebe3cb5" kindref="member">fdEof</ref>;</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(size);</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Copy<sp/>Data<sp/>From<sp/>Buffer<sp/>To<sp/>Data<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/>data[i]<sp/>=<sp/><ref refid="shell_8c_1aff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref>[i<sp/>+<sp/>offset];</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(size);</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="222"><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="225"><highlight class="comment"></highlight></codeline>
<codeline lineno="226"><highlight class="comment">Function:<sp/>int<sp/>writeUbixFS(fileDescriptor_t<sp/>*fd,char<sp/>*data,long<sp/>offset,long<sp/>size)</highlight></codeline>
<codeline lineno="227"><highlight class="comment">Description:<sp/>Write<sp/>Data<sp/>Into<sp/>File</highlight></codeline>
<codeline lineno="228"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="229" refid="include_2ubixfs_2ubixfs_8h_1ab4c558016c9b29b63d6f8c8ba5fe7384" refkind="member"><highlight class="comment"></highlight></codeline>
<codeline lineno="230"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="231"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ubixfs_8c_1ab4c558016c9b29b63d6f8c8ba5fe7384" kindref="member">writeUbixFS</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd,</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>offset,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>size)<sp/>{</highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>blockOffset<sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>blockIndex;</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>blockIndexPrev;</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>i<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*fsInfo<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref><sp/>*dirEntry<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"></highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>);</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>);</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>);</highlight></codeline>
<codeline lineno="244"><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/>blockIndex<sp/>=<sp/>blockIndexPrev<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" kindref="member">start</ref>;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/>fsInfo<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>;</highlight></codeline>
<codeline lineno="247"><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/>blockOffset<sp/>=<sp/>(offset/0x1000);</highlight></codeline>
<codeline lineno="249"><highlight class="normal"></highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref><sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;i<sp/>&lt;<sp/>blockOffset;i++)<sp/>{</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>blockIndex<sp/>=<sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndexPrev].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref>;</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)blockIndex<sp/>==<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1a9c66702437ce6449d7886b4dbaad3c02" kindref="member">EOBC</ref>)<sp/>{</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>blockIndex<sp/>=<sp/><ref refid="block_8c_1aa74ff712a9d02bb08f6421ce73358654" kindref="member">getFreeBlocks</ref>(1,fd);</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndexPrev].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref><sp/>=<sp/>blockIndex;</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref><sp/>=<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1a9c66702437ce6449d7886b4dbaad3c02" kindref="member">EOBC</ref>;</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>blockIndexPrev<sp/>=<sp/>blockIndex;</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="262"><highlight class="normal"></highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,<ref refid="include_2ubixfs_2ubixfs_8h_1ad4eebb29e7c75230c032b1e6f71e061d" kindref="member">blockSize</ref>);</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;i<sp/>&lt;<sp/>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<ref refid="structdirectoryEntry_1a9571030f709f6926b925e552660a65ab" kindref="member">size</ref>;i++)<sp/>{</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>[(offset-<sp/>(blockOffset<sp/>*0x1000))]<sp/>=<sp/>data[i];</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/>offset++;</highlight></codeline>
<codeline lineno="268"><highlight class="normal"></highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(offset%4096<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>blockOffset++;</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" kindref="member">write</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,<ref refid="include_2ubixfs_2ubixfs_8h_1ad4eebb29e7c75230c032b1e6f71e061d" kindref="member">blockSize</ref>);</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/></highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref><sp/>==<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1a9c66702437ce6449d7886b4dbaad3c02" kindref="member">EOBC</ref>)<sp/>{</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>blockIndexPrev<sp/>=<sp/>blockIndex;</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>blockIndex<sp/>=<sp/><ref refid="block_8c_1aa74ff712a9d02bb08f6421ce73358654" kindref="member">getFreeBlocks</ref>(1,fd);</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndexPrev].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref><sp/>=<sp/>blockIndex;</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1a9c66702437ce6449d7886b4dbaad3c02" kindref="member">EOBC</ref>;</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>blockIndex<sp/>=<sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref>;</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,<ref refid="include_2ubixfs_2ubixfs_8h_1ad4eebb29e7c75230c032b1e6f71e061d" kindref="member">blockSize</ref>);</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" kindref="member">write</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,fd-&gt;<ref refid="structfileDescriptor_1a1e5de6abaaaaba1c21ea108de1166a6b" kindref="member">buffer</ref>,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[blockIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,<ref refid="include_2ubixfs_2ubixfs_8h_1ad4eebb29e7c75230c032b1e6f71e061d" kindref="member">blockSize</ref>);</highlight></codeline>
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)offset<sp/>&gt;<sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref>)<sp/>{</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref><sp/>=<sp/>offset;</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/>dirEntry<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref><sp/>*)<ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(4096);</highlight></codeline>
<codeline lineno="290"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="291"><highlight class="comment"><sp/><sp/><sp/><sp/>fd-&gt;mp-&gt;device-&gt;devInfo-&gt;read(fd-&gt;mp-&gt;device-&gt;devInfo-&gt;info,dirEntry,(fd-&gt;mp-&gt;diskLabel-&gt;partitions[fd-&gt;mp-&gt;partition].pOffset+fsInfo-&gt;blockAllocationTable[fd-&gt;dirBlock].realSector),blockSize);</highlight></codeline>
<codeline lineno="292"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0x0;i&lt;(4096/</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref>));i++)<sp/>{</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)!<ref refid="string_8h_1a6f3dcb20ff11ff9db5904c3cfb61a38c" kindref="member">strcmp</ref>(dirEntry[i].<ref refid="structdirectoryEntry_1a61e77c256eaf6c4e7fe56d2574f16f98" kindref="member">fileName</ref>,fd-&gt;<ref refid="structfileDescriptor_1a3663916ccc29f892a1f98b22ffd8b8bd" kindref="member">fileName</ref>))</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/>dirEntry[i].<ref refid="structdirectoryEntry_1a9571030f709f6926b925e552660a65ab" kindref="member">size</ref><sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref>;</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/>dirEntry[i].<ref refid="structdirectoryEntry_1a83e91977e7db1dc36d3e81183ac8965c" kindref="member">startCluster</ref><sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1accd84ca186e1fd7e8e82fee3a18779ae" kindref="member">start</ref>;</highlight></codeline>
<codeline lineno="299"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="300"><highlight class="comment"><sp/><sp/><sp/><sp/>fd-&gt;mp-&gt;device-&gt;devInfo-&gt;write(fd-&gt;mp-&gt;device-&gt;devInfo-&gt;info,dirEntry,(fd-&gt;mp-&gt;diskLabel-&gt;partitions[fd-&gt;mp-&gt;partition].pOffset+fsInfo-&gt;blockAllocationTable[fd-&gt;dirBlock].realSector),blockSize);</highlight></codeline>
<codeline lineno="301"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(dirEntry);</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(<ref refid="structdirectoryEntry_1a9571030f709f6926b925e552660a65ab" kindref="member">size</ref>);</highlight></codeline>
<codeline lineno="306" refid="include_2ubixfs_2ubixfs_8h_1adfbafb62e063e24f4df09029862ba9d0" refkind="member"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="307"><highlight class="normal"></highlight></codeline>
<codeline lineno="308"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="ubixfs_8c_1adfbafb62e063e24f4df09029862ba9d0" kindref="member">ubixFSUnlink</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*path,</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structvfs__mountPoint" kindref="compound">vfs_mountPoint</ref><sp/>*mp)<sp/>{</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x=0;</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref><sp/>*dirEntry<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref><sp/>*)<ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(0x1000);</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*fsInfo<sp/>=<sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>;</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,dirEntry,(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[fsInfo-&gt;<ref refid="structubixFSInfo_1a8c58076e25df4115ed42bebce08d5181" kindref="member">rootDir</ref>].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>),8);</highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(x=0;(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)x&lt;(4096/</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref>));x++)<sp/>{</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">)!<ref refid="string_8h_1a6f3dcb20ff11ff9db5904c3cfb61a38c" kindref="member">strcmp</ref>(dirEntry[x].fileName,path))<sp/>{</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>dirEntry[x].<ref refid="structdirectoryEntry_1aeb3d1582fa3240c4847e52b7142ab801" kindref="member">attributes</ref><sp/>|=<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1ab0df352296e0f22896675aba0aa11b6e" kindref="member">typeDeleted</ref>;</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>dirEntry[x].<ref refid="structdirectoryEntry_1a61e77c256eaf6c4e7fe56d2574f16f98" kindref="member">fileName</ref>[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;?&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" kindref="member">write</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,dirEntry,(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[fsInfo-&gt;<ref refid="structubixFSInfo_1a8c58076e25df4115ed42bebce08d5181" kindref="member">rootDir</ref>].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>),8);</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;File<sp/>Not<sp/>Found\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="328"><highlight class="normal"></highlight><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="329"><highlight class="comment"></highlight></codeline>
<codeline lineno="330"><highlight class="comment">Function:<sp/>static</highlight></codeline>
<codeline lineno="331"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>int<sp/>ubixfs_loadData(fileDescriptor_t<sp/>*fd,char<sp/>*data,uInt32<sp/>size,uInt32<sp/>batIndex)</highlight></codeline>
<codeline lineno="332"><highlight class="comment"></highlight></codeline>
<codeline lineno="333"><highlight class="comment">Description:<sp/>This<sp/>will<sp/>load<sp/>the<sp/>node<sp/>data<sp/>in<sp/>from<sp/>the<sp/>disk</highlight></codeline>
<codeline lineno="334"><highlight class="comment"></highlight></codeline>
<codeline lineno="335"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="336"><highlight class="comment"><sp/><sp/>07/23/2004<sp/>-<sp/>This<sp/>loads<sp/>complete<sp/>blocks<sp/>from<sp/>disk<sp/>so<sp/>it<sp/>is<sp/>aligned<sp/>to<sp/>0x1000<sp/>not<sp/>the</highlight></codeline>
<codeline lineno="337"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>actual<sp/>file<sp/>size</highlight></codeline>
<codeline lineno="338"><highlight class="comment"></highlight></codeline>
<codeline lineno="339"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="340"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ubixfs_loadData(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd,</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data,<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>size,<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>batIndex)<sp/>{</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="342"><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*fsInfo<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="344"><highlight class="normal"></highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd);</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>);</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>);</highlight></codeline>
<codeline lineno="348"><highlight class="normal"></highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/>fsInfo<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>;</highlight></codeline>
<codeline lineno="350"><highlight class="normal"></highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/>size<sp/>=<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1abd7a711afb8ae672c3e08a9308d06c5b" kindref="member">UBIXFS_ALIGN</ref>(size);</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Loop<sp/>by<sp/>block<sp/>size<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0x0;<sp/>i&lt;size;<sp/>i<sp/>+=<sp/>(<ref refid="include_2ubixfs_2ubixfs_8h_1adab92bc23023fba8f349eb34bf5acf46" kindref="member">UBIXFS_BLOCKSIZE_BYTES</ref>))<sp/>{</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>next<sp/>block<sp/>if<sp/>we<sp/>are<sp/>ready<sp/>for<sp/>it<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>!=<sp/>0x0)</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>batIndex<sp/>=<sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndex].<ref refid="structblockAllocationTableEntry_1adb5281b505d283f4d43d09e327b63c63" kindref="member">nextBlock</ref>;</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Read<sp/>data<sp/>in<sp/>from<sp/>media<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>(fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,data+i,fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[fd-&gt;<ref refid="structfileDescriptor_1ab912b7f3f302a2f71d40f3b3810e90e8" kindref="member">mp</ref>-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[batIndex].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>,<ref refid="include_2ubixfs_2ubixfs_8h_1ad4eebb29e7c75230c032b1e6f71e061d" kindref="member">blockSize</ref>);</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="364"><highlight class="normal"></highlight></codeline>
<codeline lineno="365"><highlight class="normal"></highlight></codeline>
<codeline lineno="366"><highlight class="normal"></highlight><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="367"><highlight class="comment"></highlight></codeline>
<codeline lineno="368"><highlight class="comment">Function:<sp/>int<sp/>ubixfs_initialize()</highlight></codeline>
<codeline lineno="369"><highlight class="comment"></highlight></codeline>
<codeline lineno="370"><highlight class="comment">Description:<sp/>This<sp/>will<sp/>initialize<sp/>a<sp/>mount<sp/>point<sp/>it<sp/>loads<sp/>the<sp/>BAT<sp/>and<sp/>Caches<sp/>the<sp/>rootDir</highlight></codeline>
<codeline lineno="371" refid="ubixfs_8c_1a32762e2563015d124909f3317c2a7423" refkind="member"><highlight class="comment"></highlight></codeline>
<codeline lineno="372"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="373"><highlight class="comment"></highlight></codeline>
<codeline lineno="374"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="375"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ubixfs_8c_1a32762e2563015d124909f3317c2a7423" kindref="member">ubixfs_initialize</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structvfs__mountPoint" kindref="compound">vfs_mountPoint</ref><sp/>*mp)<sp/>{</highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*fsInfo<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="377"><highlight class="normal"></highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(mp);</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>);</highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>);</highlight></codeline>
<codeline lineno="381"><highlight class="normal"></highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref><sp/>*)<ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structubixFSInfo" kindref="compound">ubixFSInfo</ref>));</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>);</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/>fsInfo<sp/>=<sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a9771ecae1bc4482ad0282aee5766bd9b" kindref="member">fsInfo</ref>;</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a8c58076e25df4115ed42bebce08d5181" kindref="member">rootDir</ref><sp/>=<sp/>0x0;<sp/></highlight><highlight class="comment">/*<sp/>Root<sp/>directory<sp/>is<sp/>always<sp/>0x0<sp/>on<sp/>the<sp/>UbixFS<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="389"><highlight class="comment"><sp/><sp/><sp/>Check<sp/>the<sp/>disk<sp/>label<sp/>to<sp/>ensure<sp/>this<sp/>is<sp/>an<sp/>UbixFS<sp/>partition</highlight></codeline>
<codeline lineno="390"><highlight class="comment"><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1a2eea14a0546c7de19d53b3784e623463" kindref="member">magicNum</ref><sp/>==<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1a1b1ab97d6d5dfbfb20f0f80d7c625941" kindref="member">UBIXDISKMAGIC</ref>)<sp/>&amp;&amp;<sp/><sp/>(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1a95fd8a0ea36a8b3de597b92c8ebe0dce" kindref="member">magicNum2</ref><sp/>==<sp/><ref refid="include_2ubixfs_2ubixfs_8h_1a1b1ab97d6d5dfbfb20f0f80d7c625941" kindref="member">UBIXDISKMAGIC</ref>))<sp/>{</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Allocate<sp/>memory<sp/>for<sp/>BAT<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structblockAllocationTableEntry" kindref="compound">blockAllocationTableEntry</ref><sp/>*)<ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1a6a02392928bd127ff780dd656dc88203" kindref="member">pBatSize</ref><sp/>*<sp/>512);</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>);</highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>up<sp/>the<sp/>amount<sp/>of<sp/>BAT<sp/>entries<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a4f530e266f49e0310c763653399dafa2" kindref="member">batEntries</ref><sp/>=<sp/>(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1a6a02392928bd127ff780dd656dc88203" kindref="member">pBatSize</ref>*512)<sp/>/<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structblockAllocationTableEntry" kindref="compound">blockAllocationTableEntry</ref>);</highlight></codeline>
<codeline lineno="399"><highlight class="normal"></highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Read<sp/>the<sp/>BAT<sp/>to<sp/>memory<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>);</highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,<sp/></highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>,</highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>,</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1a6a02392928bd127ff780dd656dc88203" kindref="member">pBatSize</ref>);</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>up<sp/>root<sp/>directory<sp/>cache<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref><sp/>=<sp/><ref refid="dirCache_8c_1a169a7d814e5ab80f123e5193a81b70b2" kindref="member">ubixfs_cacheNew</ref>(</highlight><highlight class="stringliteral">&quot;/&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>);</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" kindref="member">info</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirectoryEntry" kindref="compound">directoryEntry</ref><sp/>*)<ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(0x4000);<sp/><sp/></highlight><highlight class="comment">/*<sp/>allocate<sp/>root<sp/>dir<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a8b26b1b3dbe3f8cb72627e09e6c8e353" kindref="member">present</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref><sp/>=<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref>));</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1aa3fa99dfac99663d5448d74594120521" kindref="member">startCluster</ref><sp/>=<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1aa3fa99dfac99663d5448d74594120521" kindref="member">startCluster</ref>));</highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a76defc9430363558ce5a96f72fa7b1d4" kindref="member">attributes</ref><sp/>=<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a76defc9430363558ce5a96f72fa7b1d4" kindref="member">attributes</ref>));</highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a1eccf5ffd0b1a3479e0e630373cff5af" kindref="member">permissions</ref><sp/>=<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a1eccf5ffd0b1a3479e0e630373cff5af" kindref="member">permissions</ref>));</highlight></codeline>
<codeline lineno="416"><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/>*fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a81d33d36c4163308906d9a48ea0f9eab" kindref="member">size</ref><sp/>=<sp/>0x4000;</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/>*fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1aa3fa99dfac99663d5448d74594120521" kindref="member">startCluster</ref><sp/>=<sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a8c58076e25df4115ed42bebce08d5181" kindref="member">rootDir</ref>;</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="assert_8h_1ad6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" kindref="member">info</ref>);</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Read<sp/>root<sp/>dir<sp/>in<sp/>from<sp/>disk<sp/>it<sp/>is<sp/>always<sp/>0x4000<sp/>bytes<sp/>long<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref>(mp-&gt;<ref refid="structvfs__mountPoint_1a5683a99774aaf81116e1765eb2509df5" kindref="member">device</ref>-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,</highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fsInfo-&gt;<ref refid="structubixFSInfo_1a6f64ea0bc1a21fca92dde6228bb194fc" kindref="member">dirCache</ref>-&gt;<ref refid="structcacheNode_1a42813fa0cdcca6ca1e6772bd20a9c321" kindref="member">info</ref>,</highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>+fsInfo-&gt;<ref refid="structubixFSInfo_1a03867f147dbbdf3c1d6cdd16a7a33097" kindref="member">blockAllocationTable</ref>[fsInfo-&gt;<ref refid="structubixFSInfo_1a8c58076e25df4115ed42bebce08d5181" kindref="member">rootDir</ref>].<ref refid="structblockAllocationTableEntry_1a47b0210bbfb05977d7d5fed3b24718b4" kindref="member">realSector</ref>),</highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>0x4000<sp/>/<sp/>512);</highlight></codeline>
<codeline lineno="426"><highlight class="normal"></highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Start<sp/>our<sp/>ubixfs_thread<sp/>to<sp/>manage<sp/>the<sp/>mount<sp/>point<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="429"><highlight class="comment"><sp/><sp/><sp/><sp/>UBU<sp/>disable<sp/>for<sp/>now</highlight></codeline>
<codeline lineno="430"><highlight class="comment"><sp/><sp/><sp/><sp/>execThread(ubixfs_Thread,0x2000),0x0);</highlight></codeline>
<codeline lineno="431"><highlight class="comment"><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;<sp/><sp/>Offset:<sp/>[%i],<sp/>Partition:<sp/>[%i]\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/>mp-&gt;<ref refid="structvfs__mountPoint_1ae5ddbb2d1c7a01716a481bc5462d6c8f" kindref="member">diskLabel</ref>-&gt;<ref refid="structubixDiskLabel_1aa97973cf7f0b67811080656e11c6385f" kindref="member">partitions</ref>[mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>].<ref refid="structubixDiskLabel_1_1ubixPartitions_1aa4f5df0b0d915aae3fe2f53449395065" kindref="member">pOffset</ref>,mp-&gt;<ref refid="structvfs__mountPoint_1a26cf95c23f79647d61dc6396bbeb94a6" kindref="member">partition</ref>);</highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;UbixFS<sp/>Initialized\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x1);</highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Not<sp/>a<sp/>valid<sp/>UbixFS<sp/>disk.\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="443"><highlight class="normal"></highlight><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="444"><highlight class="comment"></highlight></codeline>
<codeline lineno="445"><highlight class="comment">Function:<sp/>int<sp/>ubixfs_init()</highlight></codeline>
<codeline lineno="446"><highlight class="comment"></highlight></codeline>
<codeline lineno="447"><highlight class="comment">Description:<sp/>This<sp/>is<sp/>the<sp/>master<sp/>initialization<sp/>for<sp/>the<sp/>Ubix<sp/>File<sp/>System<sp/>it<sp/>will<sp/>make<sp/>the</highlight></codeline>
<codeline lineno="448"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>OS<sp/>UbixFS<sp/>aware.</highlight></codeline>
<codeline lineno="449"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>It<sp/>does<sp/>not<sp/>in<sp/>any<sp/>way<sp/>shape<sp/>or<sp/>form<sp/>connect<sp/>a<sp/>mount<sp/>point<sp/>an<sp/>medium<sp/>that<sp/>is</highlight></codeline>
<codeline lineno="450" refid="include_2ubixfs_2ubixfs_8h_1a1d4159e0eb816b6b23c214d7c601dcb4" refkind="member"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>upto<sp/>the<sp/>ubixfs_initialize()<sp/>function</highlight></codeline>
<codeline lineno="451"><highlight class="comment"></highlight></codeline>
<codeline lineno="452"><highlight class="comment">Notes:</highlight></codeline>
<codeline lineno="453"><highlight class="comment"></highlight></codeline>
<codeline lineno="454"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="455"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ubixfs_8c_1a1d4159e0eb816b6b23c214d7c601dcb4" kindref="member">ubixfs_init</ref>()<sp/>{</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>up<sp/>our<sp/>file<sp/>system<sp/>structure<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfileSystem" kindref="compound">fileSystem</ref><sp/>ubixFileSystem<sp/>=<sp/></highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/>{<ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>prev<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>next<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="ubixfs_8c_1a32762e2563015d124909f3317c2a7423" kindref="member">ubixfs_initialize</ref>,<sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsInitFS<sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="ubixfs_8c_1acbf342e4662a8d4904cdb627dc995822" kindref="member">readUbixFS</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsRead<sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="ubixfs_8c_1ab4c558016c9b29b63d6f8c8ba5fe7384" kindref="member">writeUbixFS</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsWrite<sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)openFileUbixFS,<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsOpenFile<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="ubixfs_8c_1adfbafb62e063e24f4df09029862ba9d0" kindref="member">ubixFSUnlink</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsUnlink<sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="directory_8c_1a18c0137bd371c76eb4723b6d1ae39162" kindref="member">ubixFSmkDir</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsMakeDir<sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsRemDir<sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsSync<sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/>0<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>vfsType<sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/>};<sp/></highlight><highlight class="comment">/*<sp/>ubixFileSystem<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="470"><highlight class="normal"></highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Add<sp/>UbixFS<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="vfs_8c_1ad8cb9693ae7b6b9fc419efc975778338" kindref="member">vfsRegisterFS</ref>(ubixFileSystem)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="armv6_2kpanic_8c_1adb9a182aa071791a306163d50d653deb" kindref="member">kpanic</ref>(</highlight><highlight class="stringliteral">&quot;Unable<sp/>To<sp/>Enable<sp/>UbixFS&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x1);</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="476"><highlight class="normal"></highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="478"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="480"><highlight class="normal"></highlight></codeline>
<codeline lineno="481"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="482"><highlight class="comment"><sp/>$Log:<sp/>ubixfs.c,v<sp/>$</highlight></codeline>
<codeline lineno="483"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2006/12/05<sp/>14:10:21<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="484"><highlight class="comment"><sp/>Workign<sp/>Distro</highlight></codeline>
<codeline lineno="485"><highlight class="comment"></highlight></codeline>
<codeline lineno="486"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2006/06/01<sp/>12:46:17<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="487"><highlight class="comment"><sp/>ubix2</highlight></codeline>
<codeline lineno="488"><highlight class="comment"></highlight></codeline>
<codeline lineno="489"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2005/10/12<sp/>00:13:37<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="490"><highlight class="comment"><sp/>Removed</highlight></codeline>
<codeline lineno="491"><highlight class="comment"></highlight></codeline>
<codeline lineno="492"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2005/09/26<sp/>17:24:42<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="493"><highlight class="comment"><sp/>no<sp/>message</highlight></codeline>
<codeline lineno="494"><highlight class="comment"></highlight></codeline>
<codeline lineno="495"><highlight class="comment"><sp/>Revision<sp/>1.44<sp/><sp/>2004/08/26<sp/>22:51:19<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="496"><highlight class="comment"><sp/>TCA<sp/>touched<sp/>me<sp/>:(<sp/>i<sp/>think<sp/>he<sp/>likes<sp/>men....</highlight></codeline>
<codeline lineno="497"><highlight class="comment"></highlight></codeline>
<codeline lineno="498"><highlight class="comment"></highlight></codeline>
<codeline lineno="499"><highlight class="comment"><sp/>sched.h:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>kTask_t<sp/>added<sp/>parentPid</highlight></codeline>
<codeline lineno="500"><highlight class="comment"><sp/>endtask.c:<sp/><sp/><sp/><sp/><sp/>fixed<sp/>term<sp/>back<sp/>to<sp/>parentPid</highlight></codeline>
<codeline lineno="501"><highlight class="comment"><sp/>exec.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>warnings</highlight></codeline>
<codeline lineno="502"><highlight class="comment"><sp/>fork.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fixed<sp/>term<sp/>to<sp/>childPid</highlight></codeline>
<codeline lineno="503"><highlight class="comment"><sp/>sched.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>clean<sp/>up<sp/>for<sp/>dead<sp/>tasks</highlight></codeline>
<codeline lineno="504"><highlight class="comment"><sp/>systemtask.c:<sp/>clean<sp/>up<sp/>dead<sp/>tasks</highlight></codeline>
<codeline lineno="505"><highlight class="comment"><sp/>kmalloc.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="506"><highlight class="comment"><sp/>udp.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="507"><highlight class="comment"><sp/>bot.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="508"><highlight class="comment"><sp/>shell.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="509"><highlight class="comment"><sp/>tcpdump.c:<sp/><sp/><sp/><sp/><sp/>took<sp/>a<sp/>dump</highlight></codeline>
<codeline lineno="510"><highlight class="comment"><sp/>hd.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="511"><highlight class="comment"><sp/>ubixfs.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stopped<sp/>prning<sp/>debug<sp/>info</highlight></codeline>
<codeline lineno="512"><highlight class="comment"></highlight></codeline>
<codeline lineno="513"><highlight class="comment"><sp/>Revision<sp/>1.43<sp/><sp/>2004/08/14<sp/>11:23:02<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="514"><highlight class="comment"><sp/>Changes</highlight></codeline>
<codeline lineno="515"><highlight class="comment"></highlight></codeline>
<codeline lineno="516"><highlight class="comment"><sp/>Revision<sp/>1.42<sp/><sp/>2004/08/09<sp/>12:58:05<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="517"><highlight class="comment"><sp/>let<sp/>me<sp/>know<sp/>when<sp/>you<sp/>got<sp/>the<sp/>surce</highlight></codeline>
<codeline lineno="518"><highlight class="comment"></highlight></codeline>
<codeline lineno="519"><highlight class="comment"><sp/>Revision<sp/>1.41<sp/><sp/>2004/08/01<sp/>17:58:39<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="520"><highlight class="comment"><sp/>chg:<sp/>fixed<sp/>string<sp/>allocation<sp/>bug<sp/>in<sp/>ubixfs_cacheNew()</highlight></codeline>
<codeline lineno="521"><highlight class="comment"></highlight></codeline>
<codeline lineno="522"><highlight class="comment"><sp/>Revision<sp/>1.40<sp/><sp/>2004/07/28<sp/>17:07:29<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="523"><highlight class="comment"><sp/>chg:<sp/>re-added<sp/>moving<sp/>cached<sp/>nodes<sp/>to<sp/>the<sp/>front<sp/>of<sp/>the<sp/>list<sp/>when<sp/>found</highlight></codeline>
<codeline lineno="524"><highlight class="comment"><sp/>add:<sp/>added<sp/>an<sp/>assert()<sp/>in<sp/>ubixfs.c</highlight></codeline>
<codeline lineno="525"><highlight class="comment"></highlight></codeline>
<codeline lineno="526"><highlight class="comment"><sp/>Revision<sp/>1.39<sp/><sp/>2004/07/27<sp/>19:24:31<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="527"><highlight class="comment"><sp/>chg:<sp/>reduced<sp/>the<sp/>number<sp/>of<sp/>debugging<sp/>statements<sp/>in<sp/>the<sp/>kernel.</highlight></codeline>
<codeline lineno="528"><highlight class="comment"></highlight></codeline>
<codeline lineno="529"><highlight class="comment"><sp/>Revision<sp/>1.38<sp/><sp/>2004/07/27<sp/>12:02:01<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="530"><highlight class="comment"><sp/>chg:<sp/>fixed<sp/>marks<sp/>bug<sp/>readFile<sp/>did<sp/>a<sp/>lookup<sp/>which<sp/>is<sp/>why<sp/>it<sp/>looked<sp/>like<sp/>it<sp/>was<sp/>loopping<sp/>so<sp/>much</highlight></codeline>
<codeline lineno="531"><highlight class="comment"></highlight></codeline>
<codeline lineno="532"><highlight class="comment"><sp/>Revision<sp/>1.37<sp/><sp/>2004/07/27<sp/>09:05:43<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="533"><highlight class="comment"><sp/>chg:<sp/>fixed<sp/>file<sp/>not<sp/>found<sp/>bug.<sp/>Still<sp/>can&apos;t<sp/>find<sp/>looping<sp/>issue</highlight></codeline>
<codeline lineno="534"><highlight class="comment"></highlight></codeline>
<codeline lineno="535"><highlight class="comment"><sp/>Revision<sp/>1.36<sp/><sp/>2004/07/27<sp/>04:05:20<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="536"><highlight class="comment"><sp/>chg:<sp/>kinda<sp/>fixed<sp/>it.<sp/>Added<sp/>bunches<sp/>of<sp/>debug<sp/>info</highlight></codeline>
<codeline lineno="537"><highlight class="comment"></highlight></codeline>
<codeline lineno="538"><highlight class="comment"><sp/>Revision<sp/>1.35<sp/><sp/>2004/07/26<sp/>19:15:49<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="539"><highlight class="comment"><sp/>test<sp/>code,<sp/>fixes<sp/>and<sp/>the<sp/>like</highlight></codeline>
<codeline lineno="540"><highlight class="comment"></highlight></codeline>
<codeline lineno="541"><highlight class="comment"><sp/>Revision<sp/>1.34<sp/><sp/>2004/07/24<sp/>23:04:44<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="542"><highlight class="comment"><sp/>Changes...<sp/>mark<sp/>let<sp/>me<sp/>know<sp/>if<sp/>you<sp/>fault<sp/>at<sp/>pid<sp/>185<sp/>when<sp/>you<sp/>type<sp/>stress</highlight></codeline>
<codeline lineno="543"><highlight class="comment"></highlight></codeline>
<codeline lineno="544"><highlight class="comment"><sp/>Revision<sp/>1.33<sp/><sp/>2004/07/23<sp/>09:10:06<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="545"><highlight class="comment"><sp/>ubixfs:<sp/>cleaned<sp/>up<sp/>some<sp/>functions<sp/>played<sp/>with<sp/>the<sp/>caching<sp/>a<sp/>bit</highlight></codeline>
<codeline lineno="546"><highlight class="comment"><sp/>vfs:<sp/><sp/><sp/><sp/>renamed<sp/>a<sp/>bunch<sp/>of<sp/>functions</highlight></codeline>
<codeline lineno="547"><highlight class="comment"><sp/>cleaned<sp/>up<sp/>a<sp/>few<sp/>misc<sp/>bugs</highlight></codeline>
<codeline lineno="548"><highlight class="comment"></highlight></codeline>
<codeline lineno="549"><highlight class="comment"><sp/>Revision<sp/>1.32<sp/><sp/>2004/07/22<sp/>23:01:51<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="550"><highlight class="comment"><sp/>Ok<sp/>checking<sp/>in<sp/>before<sp/>I<sp/>sleep</highlight></codeline>
<codeline lineno="551"><highlight class="comment"></highlight></codeline>
<codeline lineno="552"><highlight class="comment"><sp/>Revision<sp/>1.31<sp/><sp/>2004/07/22<sp/>22:37:03<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="553"><highlight class="comment"><sp/>Caching<sp/>is<sp/>working<sp/>now<sp/>the<sp/>FS<sp/>is<sp/>extremely<sp/>fast<sp/>but<sp/>needs<sp/>to<sp/>be<sp/>optimized<sp/>to<sp/>do<sp/>32bit<sp/>copies<sp/>over<sp/>8bit</highlight></codeline>
<codeline lineno="554"><highlight class="comment"></highlight></codeline>
<codeline lineno="555"><highlight class="comment"><sp/>Revision<sp/>1.30<sp/><sp/>2004/07/22<sp/>19:01:59<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="556"><highlight class="comment"><sp/>chg:<sp/>more<sp/>directory<sp/>and<sp/>file<sp/>caching</highlight></codeline>
<codeline lineno="557"><highlight class="comment"></highlight></codeline>
<codeline lineno="558"><highlight class="comment"><sp/>Revision<sp/>1.29<sp/><sp/>2004/07/22<sp/>16:34:32<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="559"><highlight class="comment"><sp/>add:<sp/>file<sp/>and<sp/>dir<sp/>caching<sp/>kinda<sp/>work</highlight></codeline>
<codeline lineno="560"><highlight class="comment"></highlight></codeline>
<codeline lineno="561"><highlight class="comment"><sp/>Revision<sp/>1.28<sp/><sp/>2004/07/21<sp/>22:07:18<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="562"><highlight class="comment"><sp/>chg:<sp/>renamed<sp/>caching<sp/>functions<sp/>(again)</highlight></codeline>
<codeline lineno="563"><highlight class="comment"></highlight></codeline>
<codeline lineno="564"><highlight class="comment"><sp/>Revision<sp/>1.27<sp/><sp/>2004/07/21<sp/>21:08:05<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="565"><highlight class="comment"><sp/>add:<sp/>added<sp/>provisions<sp/>for<sp/>file<sp/>caching</highlight></codeline>
<codeline lineno="566"><highlight class="comment"></highlight></codeline>
<codeline lineno="567"><highlight class="comment"><sp/>Revision<sp/>1.26<sp/><sp/>2004/07/20<sp/>23:21:31<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="568"><highlight class="comment"><sp/>syncing</highlight></codeline>
<codeline lineno="569"><highlight class="comment"></highlight></codeline>
<codeline lineno="570"><highlight class="comment"><sp/>Revision<sp/>1.25<sp/><sp/>2004/07/20<sp/>21:39:53<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="571"><highlight class="comment"><sp/>ubixfs:<sp/>does<sp/>propper<sp/>caching<sp/>now<sp/>problem<sp/>was<sp/>you<sp/>did<sp/>not<sp/>seek<sp/>realSector<sp/>however<sp/>the<sp/>os<sp/>starts<sp/>but<sp/>I<sp/>am<sp/>getting<sp/>a<sp/>segfault<sp/>could<sp/>be<sp/>from<sp/>anything<sp/>haven&apos;t<sp/>looked<sp/>into<sp/>it<sp/>right<sp/>quick</highlight></codeline>
<codeline lineno="572"><highlight class="comment"></highlight></codeline>
<codeline lineno="573"><highlight class="comment"><sp/>Revision<sp/>1.24<sp/><sp/>2004/07/20<sp/>21:38:08<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="574"><highlight class="comment"><sp/>try<sp/>now</highlight></codeline>
<codeline lineno="575"><highlight class="comment"></highlight></codeline>
<codeline lineno="576"><highlight class="comment"></highlight></codeline>
<codeline lineno="577"><highlight class="comment"><sp/>Revision<sp/>1.23<sp/><sp/>2004/07/20<sp/>21:35:09<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="578"><highlight class="comment"><sp/>Let<sp/>me<sp/>commit<sp/>before<sp/>we<sp/>start<sp/>to<sp/>overlap</highlight></codeline>
<codeline lineno="579"><highlight class="comment"></highlight></codeline>
<codeline lineno="580"><highlight class="comment"><sp/>Revision<sp/>1.22<sp/><sp/>2004/07/20<sp/>21:28:16<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="581"><highlight class="comment"><sp/>oops</highlight></codeline>
<codeline lineno="582"><highlight class="comment"></highlight></codeline>
<codeline lineno="583"><highlight class="comment"><sp/>Revision<sp/>1.20<sp/><sp/>2004/07/20<sp/>19:36:49<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="584"><highlight class="comment"><sp/>UBU<sp/>Tags</highlight></codeline>
<codeline lineno="585"><highlight class="comment"></highlight></codeline>
<codeline lineno="586"><highlight class="comment"><sp/>Revision<sp/>1.19<sp/><sp/>2004/07/20<sp/>18:09:37<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="587"><highlight class="comment"><sp/>add:<sp/>directory<sp/>caching<sp/>related<sp/>stuff</highlight></codeline>
<codeline lineno="588"><highlight class="comment"></highlight></codeline>
<codeline lineno="589"><highlight class="comment"><sp/>Revision<sp/>1.18<sp/><sp/>2004/07/17<sp/>03:21:34<sp/><sp/>flameshadow</highlight></codeline>
<codeline lineno="590"><highlight class="comment"><sp/>chg:<sp/>cleaned<sp/>up<sp/>code;<sp/>added<sp/>assert()<sp/>statements</highlight></codeline>
<codeline lineno="591"><highlight class="comment"></highlight></codeline>
<codeline lineno="592"><highlight class="comment"><sp/>Revision<sp/>1.15<sp/><sp/>2004/07/14<sp/>12:21:49<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="593"><highlight class="comment"><sp/>ubixfs:<sp/>enableUbixFs<sp/>to<sp/>ubixfs_init</highlight></codeline>
<codeline lineno="594"><highlight class="comment"><sp/>Changed<sp/>Startup<sp/>Routines</highlight></codeline>
<codeline lineno="595"><highlight class="comment"></highlight></codeline>
<codeline lineno="596"><highlight class="comment"><sp/>Revision<sp/>1.14<sp/><sp/>2004/06/28<sp/>23:12:58<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="597"><highlight class="comment"><sp/>file<sp/>format<sp/>now<sp/>container:/path/to/file</highlight></codeline>
<codeline lineno="598"><highlight class="comment"></highlight></codeline>
<codeline lineno="599"><highlight class="comment"><sp/>Revision<sp/>1.13<sp/><sp/>2004/06/28<sp/>18:12:44<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="600"><highlight class="comment"><sp/>We<sp/>need<sp/>these<sp/>files</highlight></codeline>
<codeline lineno="601"><highlight class="comment"></highlight></codeline>
<codeline lineno="602"><highlight class="comment"><sp/>Revision<sp/>1.12<sp/><sp/>2004/06/28<sp/>11:57:58<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="603"><highlight class="comment"><sp/>Fixing<sp/>Up<sp/>Filesystem</highlight></codeline>
<codeline lineno="604"><highlight class="comment"></highlight></codeline>
<codeline lineno="605"><highlight class="comment"><sp/>Revision<sp/>1.10<sp/><sp/>2004/06/04<sp/>13:20:22<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="606"><highlight class="comment"><sp/>ubixFSmkDir():<sp/>played<sp/>with<sp/>it<sp/>a<sp/>bit<sp/>to<sp/>see<sp/>if<sp/>it<sp/>still<sp/>worked</highlight></codeline>
<codeline lineno="607"><highlight class="comment"></highlight></codeline>
<codeline lineno="608"><highlight class="comment"><sp/>Revision<sp/>1.9<sp/><sp/>2004/06/04<sp/>10:19:42<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="609"><highlight class="comment"><sp/>notes:<sp/>we<sp/>compile<sp/>again,<sp/>thank<sp/>g-d<sp/>anyways<sp/>i<sp/>was<sp/>about<sp/>to<sp/>cry</highlight></codeline>
<codeline lineno="610"><highlight class="comment"></highlight></codeline>
<codeline lineno="611"><highlight class="comment"><sp/>Revision<sp/>1.8<sp/><sp/>2004/06/01<sp/>00:04:53<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="612"><highlight class="comment"><sp/>Try<sp/>now<sp/>mark</highlight></codeline>
<codeline lineno="613"><highlight class="comment"></highlight></codeline>
<codeline lineno="614"><highlight class="comment"><sp/>Revision<sp/>1.7<sp/><sp/>2004/05/19<sp/>15:20:06<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="615"><highlight class="comment"><sp/>Fixed<sp/>reference<sp/>problems<sp/>due<sp/>to<sp/>changes<sp/>in<sp/>drive<sp/>subsystem</highlight></codeline>
<codeline lineno="616"><highlight class="comment"></highlight></codeline>
<codeline lineno="617"><highlight class="comment"><sp/>Revision<sp/>1.6<sp/><sp/>2004/05/19<sp/>04:07:43<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="618"><highlight class="comment"><sp/>kmalloc(size,pid)<sp/>no<sp/>more<sp/>it<sp/>is<sp/>no<sp/>kmalloc(size);<sp/>the<sp/>way<sp/>it<sp/>should<sp/>of<sp/>been</highlight></codeline>
<codeline lineno="619"><highlight class="comment"></highlight></codeline>
<codeline lineno="620"><highlight class="comment"><sp/>Revision<sp/>1.5<sp/><sp/>2004/04/29<sp/>15:45:19<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="621"><highlight class="comment"><sp/>Fixed<sp/>some<sp/>bugs<sp/>so<sp/>now<sp/>the<sp/>automade<sp/>images<sp/>will<sp/>work<sp/>correctly</highlight></codeline>
<codeline lineno="622"><highlight class="comment"></highlight></codeline>
<codeline lineno="623"><highlight class="comment"><sp/>Revision<sp/>1.4<sp/><sp/>2004/04/28<sp/>21:10:40<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="624"><highlight class="comment"><sp/>Lots<sp/>Of<sp/>changes<sp/>to<sp/>make<sp/>it<sp/>work<sp/>with<sp/>existing<sp/>os</highlight></codeline>
<codeline lineno="625"><highlight class="comment"></highlight></codeline>
<codeline lineno="626"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2004/04/28<sp/>13:33:09<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="627"><highlight class="comment"><sp/>Overhaul<sp/>to<sp/>ubixfs<sp/>and<sp/>boot<sp/>loader<sp/>and<sp/>MBR<sp/>to<sp/>work<sp/>well<sp/>with<sp/>our<sp/>schema</highlight></codeline>
<codeline lineno="628"><highlight class="comment"><sp/>now<sp/>BAT<sp/>and<sp/>dir<sp/>and<sp/>file<sp/>entries<sp/>are<sp/>all<sp/>offset<sp/>64Sectors<sp/>from<sp/>the<sp/>start<sp/>of<sp/>the<sp/>partition</highlight></codeline>
<codeline lineno="629"><highlight class="comment"></highlight></codeline>
<codeline lineno="630"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2004/04/28<sp/>02:22:55<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="631"><highlight class="comment"><sp/>This<sp/>is<sp/>a<sp/>fiarly<sp/>large<sp/>commit<sp/>but<sp/>we<sp/>are<sp/>starting<sp/>to<sp/>use<sp/>new<sp/>driver<sp/>model</highlight></codeline>
<codeline lineno="632"><highlight class="comment"><sp/>all<sp/>around</highlight></codeline>
<codeline lineno="633"><highlight class="comment"></highlight></codeline>
<codeline lineno="634"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2004/04/15<sp/>12:07:08<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="635"><highlight class="comment"><sp/>UbixOS<sp/>v1.0</highlight></codeline>
<codeline lineno="636"><highlight class="comment"></highlight></codeline>
<codeline lineno="637"><highlight class="comment"><sp/>Revision<sp/>1.31<sp/><sp/>2004/04/13<sp/>16:36:34<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="638"><highlight class="comment"><sp/>Changed<sp/>our<sp/>copyright,<sp/>it<sp/>is<sp/>all<sp/>now<sp/>under<sp/>a<sp/>BSD-Style<sp/>license</highlight></codeline>
<codeline lineno="639"><highlight class="comment"></highlight></codeline>
<codeline lineno="640"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="641"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="642"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/fs/ubixfs/ubixfs.c"/>
  </compounddef>
</doxygen>