<?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="ufs_8c" kind="file" language="C++">
    <compoundname>ufs.c</compoundname>
    <includes refid="include_2sys_2types_8h" local="no">sys/types.h</includes>
    <includes refid="include_2vfs_2vfs_8h" local="no">vfs/vfs.h</includes>
    <includes refid="include_2vfs_2file_8h" local="no">vfs/file.h</includes>
    <includes refid="ufs_8h" local="no">ufs/ufs.h</includes>
    <includes refid="ffs_8h" local="no">ufs/ffs.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes>
    <includes refid="kpanic_8h" local="no">ubixos/kpanic.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <incdepgraph>
      <node id="21">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="35">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="36">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="33">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="42">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
      </node>
      <node id="25">
        <label>net/net.h</label>
        <link refid="net_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
      </node>
      <node id="51">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="47">
        <label>net/priv/memp_priv.h</label>
        <link refid="memp__priv_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="32" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="49">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c</label>
        <link refid="ufs_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
      </node>
      <node id="44">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="43">
        <label>net/stats.h</label>
        <link refid="stats_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>vfs/vfs.h</label>
        <link refid="include_2vfs_2vfs_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="23">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>sys/trap.h</label>
        <link refid="trap_8h"/>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="50">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="51" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="39">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
      </node>
      <node id="30">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="15">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="19">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="18">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="41">
        <label>net/ip6_addr.h</label>
        <link refid="ip6__addr_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
      </node>
      <node id="34">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="40">
        <label>net/ip4_addr.h</label>
        <link refid="ip4__addr_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="38">
        <label>net/ip_addr.h</label>
        <link refid="ip__addr_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="46">
        <label>net/priv/memp_std.h</label>
        <link refid="memp__std_8h"/>
      </node>
      <node id="5">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="32">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="33" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="48">
        <label>ufs/ffs.h</label>
        <link refid="ffs_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
      </node>
      <node id="37">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="22">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>sys/sysproto_posix.h</label>
        <link refid="sysproto__posix_8h"/>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="45">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="ufs_8c_1ae977f66f7be1f87abd0d0603e3852a06" prot="public" static="no">
        <name>DBPERVBLK</name>
        <initializer>(<ref refid="include_2vfs_2file_8h_1adf63a6145c73332883effc7746beffc2" kindref="member">VBLKSIZE</ref> / <ref refid="include_2vfs_2file_8h_1a9c8466b6111a11195a5cd2478c648e32" kindref="member">DEV_BSIZE</ref>)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="43" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="42" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1aa5a59d37ee7a73e41be17638269b06a9" prot="public" static="no">
        <name>DIP</name>
        <param><defname>field</defname></param>
        <initializer><ref refid="structfs" kindref="compound">fs</ref>-&gt;fs_magic == <ref refid="ufs_8h_1ace25c7a73c514a8e575e1ba8c15c9a9e" kindref="member">FS_UFS1_MAGIC</ref> ? dp1.field : dp2.field</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="74" column="10" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="73" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1ae4524da6e4d6ec5c11dbe5cf4559adf3" prot="public" static="no">
        <name>INDIRPERVBLK</name>
        <param><defname>fs</defname></param>
        <initializer>(<ref refid="ufs_8h_1a6d58397786421684bb8db78f01e13ae6" kindref="member">NINDIR</ref>(<ref refid="structfs" kindref="compound">fs</ref>) / ((<ref refid="structfs" kindref="compound">fs</ref>)-&gt;fs_bsize &gt;&gt; <ref refid="include_2vfs_2file_8h_1a1f8f4eabaf5119f68bfc6ee1ff715952" kindref="member">VBLKSHIFT</ref>))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="44" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="43" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1a1b76f991135322a54450c8604038d12b" prot="public" static="no">
        <name>INO_TO_VBA</name>
        <param><defname>fs</defname></param>
        <param><defname>ipervblk</defname></param>
        <param><defname>x</defname></param>
        <initializer>(<ref refid="ufs_8h_1ae26526d0ac7505aae7345f0288c17fe6" kindref="member">fsbtodb</ref>(<ref refid="structfs" kindref="compound">fs</ref>, <ref refid="ufs_8h_1af2bea0d775018173b6e6f5141f09bdd0" kindref="member">cgimin</ref>(<ref refid="structfs" kindref="compound">fs</ref>, <ref refid="ufs_8h_1a22af882911b5ccb5c744257642089932" kindref="member">ino_to_cg</ref>(<ref refid="structfs" kindref="compound">fs</ref>, x))) + \
    (((x) % (<ref refid="structfs" kindref="compound">fs</ref>)-&gt;fs_ipg) / (ipervblk) * <ref refid="ufs_8c_1ae977f66f7be1f87abd0d0603e3852a06" kindref="member">DBPERVBLK</ref>))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="47" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="46" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1add0c55395013d386f53627b02e0cf27a" prot="public" static="no">
        <name>INO_TO_VBO</name>
        <param><defname>ipervblk</defname></param>
        <param><defname>x</defname></param>
        <initializer>((x) % ipervblk)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="50" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="49" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1a093aab4d88e8ac7dacc93d9cb6cc58ee" prot="public" static="no">
        <name>INOPB</name>
        <param><defname>fs</defname></param>
        <initializer>((<ref refid="structfs" kindref="compound">fs</ref>)-&gt;fs_inopb)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="46" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="45" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1a3fe028b32899dee05ea1b48efb73fe33" prot="public" static="no">
        <name>IPERVBLK</name>
        <param><defname>fs</defname></param>
        <initializer>(<ref refid="ufs_2ffs_2fs_8h_1a093aab4d88e8ac7dacc93d9cb6cc58ee" kindref="member">INOPB</ref>(<ref refid="structfs" kindref="compound">fs</ref>) / ((<ref refid="structfs" kindref="compound">fs</ref>)-&gt;fs_bsize &gt;&gt; <ref refid="include_2vfs_2file_8h_1a1f8f4eabaf5119f68bfc6ee1ff715952" kindref="member">VBLKSHIFT</ref>))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="45" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="44" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1a8c3f8bc1aebec0e57f9e9a6b2ffa640e" prot="public" static="no">
        <name>VBLKMASK</name>
        <initializer>(<ref refid="include_2vfs_2file_8h_1adf63a6145c73332883effc7746beffc2" kindref="member">VBLKSIZE</ref> - 1)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="42" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="41" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1a1f8f4eabaf5119f68bfc6ee1ff715952" prot="public" static="no">
        <name>VBLKSHIFT</name>
        <initializer>12</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="40" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="39" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="ufs_8c_1adf63a6145c73332883effc7746beffc2" prot="public" static="no">
        <name>VBLKSIZE</name>
        <initializer>(1 &lt;&lt; <ref refid="include_2vfs_2file_8h_1a1f8f4eabaf5119f68bfc6ee1ff715952" kindref="member">VBLKSHIFT</ref>)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="41" column="9" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="40" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="ufs_8c_1a8d5779eb674b28e517275bda58b7c041" prot="public" static="yes" mutable="no">
        <type>int</type>
        <definition>int sblock_try[]</definition>
        <argsstring>[]</argsstring>
        <name>sblock_try</name>
        <initializer>= <ref refid="ufs_8h_1a63f5b70b0dfe26fd775e89713f552e23" kindref="member">SBLOCKSEARCH</ref></initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="66" column="12" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="66" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="ufs_8c_1a3f26199d0461e439e5279b1c0a34cb84" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int dskread</definition>
        <argsstring>(void *buf, uint64_t block, size_t count, fileDescriptor_t *fd)</argsstring>
        <name>dskread</name>
        <param>
          <type>void *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a747748dd98cf1e2e89eb8b1fa37113df" kindref="member">uint64_t</ref></type>
          <declname>block</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a7619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
          <declname>count</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/ufs/ufs.c" line="51" column="12" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="51" bodyend="54"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1a35575e5dc1f35e44abc347f146390dbf" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="cdefs_8h_1a96deb7ba5a74848afb710cc4ee6d2c08" kindref="member">__inline</ref> int</type>
        <definition>static __inline int fsfind</definition>
        <argsstring>(const char *name, ino_t *ino, fileDescriptor_t *fd)</argsstring>
        <name>fsfind</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>name</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref> *</type>
          <declname>ino</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/ufs/ufs.c" line="211" column="21" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="211" bodyend="229"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1ae8def9db24e37ba790fbca354c96c242" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2sys_2types_8h_1a87bd983bf349d8b86901f3200d559e8e" kindref="member">ssize_t</ref></type>
        <definition>static ssize_t fsread</definition>
        <argsstring>(ino_t inode, void *buf, size_t nbyte, fileDescriptor_t *fd)</argsstring>
        <name>fsread</name>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref></type>
          <declname>inode</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a7619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref></type>
          <declname>nbyte</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/ufs/ufs.c" line="76" column="16" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="76" bodyend="209"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1a69727f5f79e30b4fcaee6c829c721122" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref></type>
        <definition>static ino_t lookup</definition>
        <argsstring>(const char *path, fileDescriptor_t *fd)</argsstring>
        <name>lookup</name>
        <param>
          <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
          <declname>path</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/ufs/ufs.c" line="231" column="14" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="231" bodyend="264"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1a349e4b7ceea770cd630e0297b693d59e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int ufs_init</definition>
        <argsstring>()</argsstring>
        <name>ufs_init</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" line="313" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="313" bodyend="335"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1ac2f26ec05df38049821476d41aeb1038" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int ufs_initialize</definition>
        <argsstring>(struct vfs_mountPoint *mp)</argsstring>
        <name>ufs_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/ufs/ufs.c" line="308" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="308" bodyend="311"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1acde618b8118d3034190d14afe9b766be" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>static int ufs_openFile</definition>
        <argsstring>(const char *file, fileDescriptor_t *fd)</argsstring>
        <name>ufs_openFile</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/ufs/ufs.c" line="266" column="12" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="266" bodyend="289"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1aeb87da3578100f42190deb78d191cf65" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int ufs_readFile</definition>
        <argsstring>(fileDescriptor_t *fd, char *data, uInt32 offset, long size)</argsstring>
        <name>ufs_readFile</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/ufs/ufs.c" line="291" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="291" bodyend="293"/>
      </memberdef>
      <memberdef kind="function" id="ufs_8c_1a352e2c889644d8d992445b347d1ffe41" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int ufs_writeFile</definition>
        <argsstring>(fileDescriptor_t *fd, char *data, uInt32 offset, long size)</argsstring>
        <name>ufs_writeFile</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/ufs/ufs.c" line="295" column="5" bodyfile="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c" bodystart="295" bodyend="298"/>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
      </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/>ufs.c<sp/>102<sp/>2016-01-12<sp/>03:59:34Z<sp/>reddawg<sp/>$</highlight></codeline>
<codeline lineno="27"><highlight class="comment"></highlight></codeline>
<codeline lineno="28"><highlight class="comment"><sp/>*****************************************************************************************/</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_2sys_2types_8h" kindref="compound">sys/types.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><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="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="include_2vfs_2file_8h" kindref="compound">vfs/file.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="ufs_8h" kindref="compound">ufs/ufs.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="ffs_8h" kindref="compound">ufs/ffs.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><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="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="kpanic_8h" kindref="compound">ubixos/kpanic.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><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="39" refid="ufs_8c_1a1f8f4eabaf5119f68bfc6ee1ff715952" refkind="member"><highlight class="normal"></highlight></codeline>
<codeline lineno="40" refid="ufs_8c_1adf63a6145c73332883effc7746beffc2" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>VBLKSHIFT<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>12</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="41" refid="ufs_8c_1a8c3f8bc1aebec0e57f9e9a6b2ffa640e" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>VBLKSIZE<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(1<sp/>&lt;&lt;<sp/>VBLKSHIFT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42" refid="ufs_8c_1ae977f66f7be1f87abd0d0603e3852a06" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>VBLKMASK<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(VBLKSIZE<sp/>-<sp/>1)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43" refid="ufs_8c_1ae4524da6e4d6ec5c11dbe5cf4559adf3" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>DBPERVBLK<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(VBLKSIZE<sp/>/<sp/>DEV_BSIZE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44" refid="ufs_8c_1a3fe028b32899dee05ea1b48efb73fe33" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>INDIRPERVBLK(fs)<sp/>(NINDIR(fs)<sp/>/<sp/>((fs)-&gt;fs_bsize<sp/>&gt;&gt;<sp/>VBLKSHIFT))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45" refid="ufs_8c_1a093aab4d88e8ac7dacc93d9cb6cc58ee" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>IPERVBLK(fs)<sp/><sp/><sp/><sp/><sp/>(INOPB(fs)<sp/>/<sp/>((fs)-&gt;fs_bsize<sp/>&gt;&gt;<sp/>VBLKSHIFT))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46" refid="ufs_8c_1a1b76f991135322a54450c8604038d12b" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>INOPB(fs)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((fs)-&gt;fs_inopb)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>INO_TO_VBA(fs,<sp/>ipervblk,<sp/>x)<sp/>\</highlight></codeline>
<codeline lineno="48"><highlight class="preprocessor"><sp/><sp/><sp/><sp/>(fsbtodb(fs,<sp/>cgimin(fs,<sp/>ino_to_cg(fs,<sp/>x)))<sp/>+<sp/>\</highlight></codeline>
<codeline lineno="49" refid="ufs_8c_1add0c55395013d386f53627b02e0cf27a" refkind="member"><highlight class="preprocessor"><sp/><sp/><sp/><sp/>(((x)<sp/>%<sp/>(fs)-&gt;fs_ipg)<sp/>/<sp/>(ipervblk)<sp/>*<sp/>DBPERVBLK))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>INO_TO_VBO(ipervblk,<sp/>x)<sp/>((x)<sp/>%<sp/>ipervblk)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dskread(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/><ref refid="include_2sys_2types_8h_1a747748dd98cf1e2e89eb8b1fa37113df" kindref="member">uint64_t</ref><sp/>block,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>count,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="53"><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>,<sp/><ref refid="structbuf" kindref="compound">buf</ref>,<sp/>block,<sp/>count);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="55"><highlight class="normal">}</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight><highlight class="comment">//struct<sp/>dmadat<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>char<sp/>blkbuf[VBLKSIZE];<sp/><sp/>/*<sp/>filesystem<sp/>blocks<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>char<sp/>indbuf[VBLKSIZE];<sp/><sp/>/*<sp/>indir<sp/>blocks<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>char<sp/>sbbuf[SBLOCKSIZE];<sp/>/*<sp/>superblock<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>char<sp/>secbuf[DEV_BSIZE];<sp/>/*<sp/>for<sp/>MBR/disklabel<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>};</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight><highlight class="comment">//static<sp/>struct<sp/>dmadat<sp/>*dmadat;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="comment">//static<sp/>int<sp/>ls,dsk_meta;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>sblock_try[]<sp/>=<sp/><ref refid="ufs_2ffs_2fs_8h_1a63f5b70b0dfe26fd775e89713f552e23" kindref="member">SBLOCKSEARCH</ref>;</highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(UFS2_ONLY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>DIP(field)<sp/>dp2.field</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight><highlight class="preprocessor">#elif<sp/>defined(UFS1_ONLY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>DIP(field)<sp/>dp1.field</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73" refid="ufs_8c_1aa5a59d37ee7a73e41be17638269b06a9" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>DIP(field)<sp/>fs-&gt;fs_magic<sp/>==<sp/>FS_UFS1_MAGIC<sp/>?<sp/>dp1.field<sp/>:<sp/>dp2.field</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1a87bd983bf349d8b86901f3200d559e8e" kindref="member">ssize_t</ref><sp/>fsread(<ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref><sp/><ref refid="structinode" kindref="compound">inode</ref>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>nbyte,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>UFS2_ONLY</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structufs1__dinode" kindref="compound">ufs1_dinode</ref><sp/>dp1;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>UFS1_ONLY</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structufs2__dinode" kindref="compound">ufs2_dinode</ref><sp/>dp2;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref><sp/>inomap;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*blkbuf;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*indbuf;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfs" kindref="compound">fs</ref><sp/>*<ref refid="structfs" kindref="compound">fs</ref>;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*s;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>n,<sp/>nb,<sp/>size,<sp/>off,<sp/>vboff;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><ref refid="ufs_8h_1acfdbacc42c74f81152f66f8f81316513" kindref="member">ufs_lbn_t</ref><sp/>lbn;</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><ref refid="ufs_8h_1ad1d47f60518d845f7e798fa0f3458753" kindref="member">ufs2_daddr_t</ref><sp/>addr,<sp/>vbaddr;</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="ufs_8h_1ad1d47f60518d845f7e798fa0f3458753" kindref="member">ufs2_daddr_t</ref><sp/><ref refid="ufs_2ffs_2fs_8h_1ac11647795eb085ee43328d0c5bda47ae" kindref="member">blkmap</ref>,<sp/>indmap;</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1ac319c165d52643e43249fe003e18bdf3" kindref="member">u_int</ref><sp/>u;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/>blkbuf<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ad411e9a6fd040afcee6986c027d5a999" kindref="member">dmadat</ref>-&gt;<ref refid="structdmadat_1ad134ba5a7290b627a60d5fd83fc2f204" kindref="member">blkbuf</ref>;</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/>indbuf<sp/>=<sp/>fd-&gt;<ref refid="structfileDescriptor_1ad411e9a6fd040afcee6986c027d5a999" kindref="member">dmadat</ref>-&gt;<ref refid="structdmadat_1ae1f8eab27e979807a50dbf2d54ec1476" kindref="member">indbuf</ref>;</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><ref refid="structfs" kindref="compound">fs</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfs" kindref="compound">fs</ref><sp/>*)<sp/>fd-&gt;<ref refid="structfileDescriptor_1ad411e9a6fd040afcee6986c027d5a999" kindref="member">dmadat</ref>-&gt;<ref refid="structdmadat_1ab267db93faadfbb8c65f16ca4df76055" kindref="member">sbbuf</ref>;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>if<sp/>(!fd-&gt;<ref refid="structfileDescriptor_1a2e962220f5878aaa4be699c5d04303e5" kindref="member">dsk_meta</ref>)<sp/>{</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/>inomap<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(n<sp/>=<sp/>0;<sp/>sblock_try[n]<sp/>!=<sp/>-1;<sp/>n++)<sp/>{</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dskread(<ref refid="structfs" kindref="compound">fs</ref>,<sp/>sblock_try[n]<sp/>/<sp/><ref refid="gpt_8h_1a9c8466b6111a11195a5cd2478c648e32" kindref="member">DEV_BSIZE</ref>,<sp/>16,<sp/>fd))</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((</highlight></codeline>
<codeline lineno="105"><highlight class="normal">#</highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>defined(UFS1_ONLY)</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1aacc2f0aa6f3902f165c563ce5ba76373" kindref="member">fs_magic</ref><sp/>==<sp/><ref refid="ufs_2ffs_2fs_8h_1ace25c7a73c514a8e575e1ba8c15c9a9e" kindref="member">FS_UFS1_MAGIC</ref></highlight></codeline>
<codeline lineno="107"><highlight class="normal">#elif<sp/>defined(UFS2_ONLY)</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1aacc2f0aa6f3902f165c563ce5ba76373" kindref="member">fs_magic</ref><sp/>==<sp/><ref refid="ufs_2ffs_2fs_8h_1a0b73b7456fc1dee932dc0c1056c613fc" kindref="member">FS_UFS2_MAGIC</ref><sp/>&amp;&amp;<sp/><ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1a7f7bd1346fb9aa31b3509e7736b9c3c5" kindref="member">fs_sblockloc</ref><sp/>==<sp/>sblock_try[n])</highlight></codeline>
<codeline lineno="109"><highlight class="normal">#</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1aacc2f0aa6f3902f165c563ce5ba76373" kindref="member">fs_magic</ref><sp/>==<sp/><ref refid="ufs_2ffs_2fs_8h_1ace25c7a73c514a8e575e1ba8c15c9a9e" kindref="member">FS_UFS1_MAGIC</ref><sp/>||<sp/>(<ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1aacc2f0aa6f3902f165c563ce5ba76373" kindref="member">fs_magic</ref><sp/>==<sp/><ref refid="ufs_2ffs_2fs_8h_1a0b73b7456fc1dee932dc0c1056c613fc" kindref="member">FS_UFS2_MAGIC</ref><sp/>&amp;&amp;<sp/><ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1a7f7bd1346fb9aa31b3509e7736b9c3c5" kindref="member">fs_sblockloc</ref><sp/>==<sp/>sblock_try[n])</highlight></codeline>
<codeline lineno="111"><highlight class="normal">#endif</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>)<sp/>&amp;&amp;<sp/><ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1abeaa37858276e7d7d7f8f4260bc53f6d" kindref="member">fs_bsize</ref><sp/>&lt;=<sp/><ref refid="ufs_8h_1a6e852e863e63ab118ec196d1157a1dbd" kindref="member">MAXBSIZE</ref><sp/>&amp;&amp;<sp/><ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1abeaa37858276e7d7d7f8f4260bc53f6d" kindref="member">fs_bsize</ref><sp/>&gt;=<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfs" kindref="compound">fs</ref>))</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>break;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//MrOlsen<sp/>2017-12-14<sp/>this<sp/>was<sp/>for<sp/>debugging<sp/>kprintf(&quot;Finding<sp/>SBlock:<sp/>[%s][0x%X][%i<sp/>-<sp/>%i]\n&quot;,<sp/>fs-&gt;fs_fsmnt,<sp/>fs-&gt;fs_magic,<sp/>sblock_try[n],<sp/>sblock_try[n]<sp/>/<sp/>DEV_BSIZE);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sblock_try[n]<sp/>==<sp/>-1)<sp/>{</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Not<sp/>ufs\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a2e962220f5878aaa4be699c5d04303e5" kindref="member">dsk_meta</ref>++;</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="structinode" kindref="compound">inode</ref>)</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(inomap<sp/>!=<sp/><ref refid="structinode" kindref="compound">inode</ref>)<sp/>{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/>n<sp/>=<sp/><ref refid="ufs_8c_1a3fe028b32899dee05ea1b48efb73fe33" kindref="member">IPERVBLK</ref>(<ref refid="structfs" kindref="compound">fs</ref>);</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dskread(blkbuf,<sp/><ref refid="ufs_8c_1a1b76f991135322a54450c8604038d12b" kindref="member">INO_TO_VBA</ref>(<ref refid="structfs" kindref="compound">fs</ref>,<sp/>n,<sp/><ref refid="structinode" kindref="compound">inode</ref>),<sp/><ref refid="ufs_8c_1ae977f66f7be1f87abd0d0603e3852a06" kindref="member">DBPERVBLK</ref>,<sp/>fd))</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/>n<sp/>=<sp/><ref refid="ufs_8c_1add0c55395013d386f53627b02e0cf27a" kindref="member">INO_TO_VBO</ref>(n,<sp/><ref refid="structinode" kindref="compound">inode</ref>);</highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(UFS1_ONLY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/>dp1<sp/>=<sp/>((</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structufs1__dinode" kindref="compound">ufs1_dinode</ref><sp/>*)blkbuf)[n];</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(fd-&gt;<ref refid="structfileDescriptor_1a0f327ca421a257ebbabbb741cfcf2904" kindref="member">inode</ref>.ufs1,<sp/>dp1,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structufs1__dinode" kindref="compound">ufs1_dinode</ref>));</highlight></codeline>
<codeline lineno="134"><highlight class="normal"></highlight><highlight class="preprocessor">#elif<sp/>defined(UFS2_ONLY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/>dp2<sp/>=<sp/>((</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structufs2__dinode" kindref="compound">ufs2_dinode</ref><sp/>*)blkbuf)[n];</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(fd-&gt;<ref refid="structfileDescriptor_1a0f327ca421a257ebbabbb741cfcf2904" kindref="member">inode</ref>.ufs2,<sp/>dp2,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structufs2__dinode" kindref="compound">ufs2_dinode</ref>));</highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1aacc2f0aa6f3902f165c563ce5ba76373" kindref="member">fs_magic</ref><sp/>==<sp/><ref refid="ufs_2ffs_2fs_8h_1ace25c7a73c514a8e575e1ba8c15c9a9e" kindref="member">FS_UFS1_MAGIC</ref>)<sp/>{</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>dp1<sp/>=<sp/>((</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structufs1__dinode" kindref="compound">ufs1_dinode</ref><sp/>*)<sp/>blkbuf)[n];</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(&amp;fd-&gt;<ref refid="structfileDescriptor_1a0f327ca421a257ebbabbb741cfcf2904" kindref="member">inode</ref>.<ref refid="structinode_1a82b45e7d93016820fc4927298aa2f772" kindref="member">u</ref>.<ref refid="structinode_1a8d458da2adb1d183a99f6ebd4f4f3887" kindref="member">ufs1_i</ref>,<sp/>&amp;dp1,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structufs1__dinode" kindref="compound">ufs1_dinode</ref>));</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>dp2<sp/>=<sp/>((</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structufs2__dinode" kindref="compound">ufs2_dinode</ref><sp/>*)<sp/>blkbuf)[n];</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(&amp;fd-&gt;<ref refid="structfileDescriptor_1a0f327ca421a257ebbabbb741cfcf2904" kindref="member">inode</ref>.<ref refid="structinode_1a82b45e7d93016820fc4927298aa2f772" kindref="member">u</ref>.<ref refid="structinode_1ae43bfb8e013c227880cd49b341f86292" kindref="member">ufs2_i</ref>,<sp/>&amp;dp2,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structufs2__dinode" kindref="compound">ufs2_dinode</ref>));</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/>inomap<sp/>=<sp/><ref refid="structinode" kindref="compound">inode</ref>;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="ufs_2ffs_2fs_8h_1ac11647795eb085ee43328d0c5bda47ae" kindref="member">blkmap</ref><sp/>=<sp/>indmap<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/>s<sp/>=<sp/><ref refid="structbuf" kindref="compound">buf</ref>;</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/>size<sp/>=<sp/><ref refid="ufs_8c_1aa5a59d37ee7a73e41be17638269b06a9" kindref="member">DIP</ref>(<ref refid="structufs2__dinode_1ad5993494c57c494293c25dc81ec3b154" kindref="member">di_size</ref>);</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ac8c9ca78af4599be9bbba7fa8a37eee8" kindref="member">size</ref><sp/>=<sp/>size;</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/>n<sp/>=<sp/>size<sp/>-<sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>;</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//Why?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(n<sp/>&lt;<sp/>0)</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(nbyte<sp/>&gt;<sp/>n)</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/>nbyte<sp/>=<sp/>n;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/>nb<sp/>=<sp/>nbyte;</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(nb)<sp/>{</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/>lbn<sp/>=<sp/><ref refid="ufs_2ffs_2fs_8h_1a1ea09415cf1bc5de0d0d4a7158a5c736" kindref="member">lblkno</ref>(<ref refid="structfs" kindref="compound">fs</ref>,<sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>);</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/>off<sp/>=<sp/><ref refid="ufs_2ffs_2fs_8h_1acd9d1b3e1eed7fc3850f8a78636dd5a7" kindref="member">blkoff</ref>(<ref refid="structfs" kindref="compound">fs</ref>,<sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref>);</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lbn<sp/>&lt;<sp/><ref refid="ufs_8h_1a0c136d7ef3223bdd2b6e7c83c65bb508" kindref="member">NDADDR</ref>)<sp/>{</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>addr<sp/>=<sp/><ref refid="ufs_8c_1aa5a59d37ee7a73e41be17638269b06a9" kindref="member">DIP</ref>(<ref refid="structufs2__dinode_1a667ab9837a0fd21d51108ca9dfd85f66" kindref="member">di_db</ref>[lbn]);</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lbn<sp/>&lt;<sp/><ref refid="ufs_8h_1a0c136d7ef3223bdd2b6e7c83c65bb508" kindref="member">NDADDR</ref><sp/>+<sp/><ref refid="ufs_2ffs_2fs_8h_1a6d58397786421684bb8db78f01e13ae6" kindref="member">NINDIR</ref>(<ref refid="structfs" kindref="compound">fs</ref>))<sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>n<sp/>=<sp/><ref refid="ufs_8c_1ae4524da6e4d6ec5c11dbe5cf4559adf3" kindref="member">INDIRPERVBLK</ref>(<ref refid="structfs" kindref="compound">fs</ref>);</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>addr<sp/>=<sp/><ref refid="ufs_8c_1aa5a59d37ee7a73e41be17638269b06a9" kindref="member">DIP</ref>(<ref refid="structufs2__dinode_1a9eb4d981d19dd77fbde21e84fd4e2d5d" kindref="member">di_ib</ref>[0]);</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>u<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1ac319c165d52643e43249fe003e18bdf3" kindref="member">u_int</ref>)<sp/>(lbn<sp/>-<sp/><ref refid="ufs_8h_1a0c136d7ef3223bdd2b6e7c83c65bb508" kindref="member">NDADDR</ref>)<sp/>/<sp/>(n<sp/>*<sp/><ref refid="ufs_8c_1ae977f66f7be1f87abd0d0603e3852a06" kindref="member">DBPERVBLK</ref>);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>vbaddr<sp/>=<sp/><ref refid="ufs_2ffs_2fs_8h_1ae26526d0ac7505aae7345f0288c17fe6" kindref="member">fsbtodb</ref>(<ref refid="structfs" kindref="compound">fs</ref>,<sp/>addr)<sp/>+<sp/>u;</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(indmap<sp/>!=<sp/>vbaddr)<sp/>{</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dskread(indbuf,<sp/>vbaddr,<sp/><ref refid="ufs_8c_1ae977f66f7be1f87abd0d0603e3852a06" kindref="member">DBPERVBLK</ref>,<sp/>fd))</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>indmap<sp/>=<sp/>vbaddr;</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>n<sp/>=<sp/>(lbn<sp/>-<sp/><ref refid="ufs_8h_1a0c136d7ef3223bdd2b6e7c83c65bb508" kindref="member">NDADDR</ref>)<sp/>&amp;<sp/>(n<sp/>-<sp/>1);</highlight></codeline>
<codeline lineno="178"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(UFS1_ONLY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>addr<sp/>=<sp/>((<ref refid="ufs_8h_1a6c4d2453c62592d30d9c981e4ee01323" kindref="member">ufs1_daddr_t</ref><sp/>*)indbuf)[n];</highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight><highlight class="preprocessor">#elif<sp/>defined(UFS2_ONLY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>addr<sp/>=<sp/>((<ref refid="ufs_8h_1ad1d47f60518d845f7e798fa0f3458753" kindref="member">ufs2_daddr_t</ref><sp/>*)indbuf)[n];</highlight></codeline>
<codeline lineno="182"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structfs" kindref="compound">fs</ref>-&gt;<ref refid="structfs_1aacc2f0aa6f3902f165c563ce5ba76373" kindref="member">fs_magic</ref><sp/>==<sp/><ref refid="ufs_2ffs_2fs_8h_1ace25c7a73c514a8e575e1ba8c15c9a9e" kindref="member">FS_UFS1_MAGIC</ref>)</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>addr<sp/>=<sp/>((<ref refid="ufs_8h_1a6c4d2453c62592d30d9c981e4ee01323" kindref="member">ufs1_daddr_t</ref><sp/>*)<sp/>indbuf)[n];</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>addr<sp/>=<sp/>((<ref refid="ufs_8h_1ad1d47f60518d845f7e798fa0f3458753" kindref="member">ufs2_daddr_t</ref><sp/>*)<sp/>indbuf)[n];</highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/>vbaddr<sp/>=<sp/><ref refid="ufs_2ffs_2fs_8h_1ae26526d0ac7505aae7345f0288c17fe6" kindref="member">fsbtodb</ref>(<ref refid="structfs" kindref="compound">fs</ref>,<sp/>addr)<sp/>+<sp/>(off<sp/>&gt;&gt;<sp/><ref refid="ufs_8c_1a1f8f4eabaf5119f68bfc6ee1ff715952" kindref="member">VBLKSHIFT</ref>)<sp/>*<sp/><ref refid="ufs_8c_1ae977f66f7be1f87abd0d0603e3852a06" kindref="member">DBPERVBLK</ref>;</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/>vboff<sp/>=<sp/>off<sp/>&amp;<sp/><ref refid="ufs_8c_1a8c3f8bc1aebec0e57f9e9a6b2ffa640e" kindref="member">VBLKMASK</ref>;</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/>n<sp/>=<sp/><ref refid="ufs_2ffs_2fs_8h_1ad35c4c33dc54a0b8db742e0b3b5f64aa" kindref="member">sblksize</ref>(<ref refid="structfs" kindref="compound">fs</ref>,<sp/>size,<sp/>lbn)<sp/>-<sp/>(off<sp/>&amp;<sp/>~<ref refid="ufs_8c_1a8c3f8bc1aebec0e57f9e9a6b2ffa640e" kindref="member">VBLKMASK</ref>);</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(n<sp/>&gt;<sp/><ref refid="ufs_8c_1adf63a6145c73332883effc7746beffc2" kindref="member">VBLKSIZE</ref>)</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>n<sp/>=<sp/><ref refid="ufs_8c_1adf63a6145c73332883effc7746beffc2" kindref="member">VBLKSIZE</ref>;</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="ufs_2ffs_2fs_8h_1ac11647795eb085ee43328d0c5bda47ae" kindref="member">blkmap</ref><sp/>!=<sp/>vbaddr)<sp/>{</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dskread(blkbuf,<sp/>vbaddr,<sp/>n<sp/>&gt;&gt;<sp/><ref refid="gpt_8h_1a9734470bf89968d142073fd334bf9cb6" kindref="member">DEV_BSHIFT</ref>,<sp/>fd))</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="ufs_2ffs_2fs_8h_1ac11647795eb085ee43328d0c5bda47ae" kindref="member">blkmap</ref><sp/>=<sp/>vbaddr;</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/>n<sp/>-=<sp/>vboff;</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(n<sp/>&gt;<sp/>nb)</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>n<sp/>=<sp/>nb;</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(s,<sp/>blkbuf<sp/>+<sp/>vboff,<sp/>n);</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/>s<sp/>+=<sp/>n;</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>+=<sp/>n;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>nb<sp/>-=<sp/>n;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>nbyte;</highlight></codeline>
<codeline lineno="210"><highlight class="normal">}</highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="cdefs_8h_1a96deb7ba5a74848afb710cc4ee6d2c08" kindref="member">__inline</ref><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>fsfind(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/><ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref><sp/>*<sp/>ino,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><ref refid="structbuf" kindref="compound">buf</ref>[<ref refid="gpt_8h_1a9c8466b6111a11195a5cd2478c648e32" kindref="member">DEV_BSIZE</ref>];</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdirent" kindref="compound">dirent</ref><sp/>*d;</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*s;</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a87bd983bf349d8b86901f3200d559e8e" kindref="member">ssize_t</ref><sp/>n;</highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((n<sp/>=<sp/>fsread(*ino,<sp/><ref refid="structbuf" kindref="compound">buf</ref>,<sp/><ref refid="gpt_8h_1a9c8466b6111a11195a5cd2478c648e32" kindref="member">DEV_BSIZE</ref>,<sp/>fd))<sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(s<sp/>=<sp/><ref refid="structbuf" kindref="compound">buf</ref>;<sp/>s<sp/>&lt;<sp/><ref refid="structbuf" kindref="compound">buf</ref><sp/>+<sp/><ref refid="gpt_8h_1a9c8466b6111a11195a5cd2478c648e32" kindref="member">DEV_BSIZE</ref>;)<sp/>{</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>d<sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>s;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="string_8h_1a6f3dcb20ff11ff9db5904c3cfb61a38c" kindref="member">strcmp</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>d-&gt;<ref refid="structdirent_1a8cb13e39a90c43e6b180ff4f1614e4da" kindref="member">d_name</ref>))<sp/>{</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*ino<sp/>=<sp/>d-&gt;<ref refid="structdirent_1a0aa21d56704896b87f8a39ecba4f3731" kindref="member">d_fileno</ref>;</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>d-&gt;<ref refid="structdirent_1aa850909d0a98e07d0ccd6232d28ed133" kindref="member">d_type</ref>;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>s<sp/>+=<sp/>d-&gt;<ref refid="structdirent_1a6ca250ead8b04b71ea787acbd29b6b75" kindref="member">d_reclen</ref>;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/>*ino<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="230"><highlight class="normal">}</highlight></codeline>
<codeline lineno="231"><highlight class="normal"></highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref><sp/><ref refid="namei_8c_1ad77c16b56493b15a0ffa0f3aedbffb71" kindref="member">lookup</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*path,<sp/><ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd)<sp/>{</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[<ref refid="ufs_8h_1ab347d7e5c2fdca2d28e693b2a508d76a" kindref="member">MAXNAMLEN</ref><sp/>+<sp/>1];</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*s;</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a73341b7381d39d6e5b80ff9f23379dbd" kindref="member">ino_t</ref><sp/>ino;</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a87bd983bf349d8b86901f3200d559e8e" kindref="member">ssize_t</ref><sp/>n;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dt;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"></highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/>ino<sp/>=<sp/><ref refid="ufs_8h_1a22c8ea96d09283ed6496347806cc72a0" kindref="member">ROOTINO</ref>;</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/>dt<sp/>=<sp/><ref refid="ufs_8h_1a1dcee67486bc4238096ecb61e2d9ffd1" kindref="member">DT_DIR</ref>;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[0]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;/&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[1]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(;;)<sp/>{</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(*path<sp/>==<sp/></highlight><highlight class="charliteral">&apos;/&apos;</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>path++;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!*path)</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(s<sp/>=<sp/>path;<sp/>*s<sp/>&amp;&amp;<sp/>*s<sp/>!=<sp/></highlight><highlight class="charliteral">&apos;/&apos;</highlight><highlight class="normal">;<sp/>s++)</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>;</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((n<sp/>=<sp/>s<sp/>-<sp/>path)<sp/>&gt;<sp/><ref refid="ufs_8h_1ab347d7e5c2fdca2d28e693b2a508d76a" kindref="member">MAXNAMLEN</ref>)</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//ls<sp/>=<sp/>*path<sp/>==<sp/>&apos;?&apos;<sp/>&amp;&amp;<sp/>n<sp/>==<sp/>1<sp/>&amp;&amp;<sp/>!*s;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>path,<sp/>n);</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[n]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dt<sp/>!=<sp/><ref refid="ufs_8h_1a1dcee67486bc4238096ecb61e2d9ffd1" kindref="member">DT_DIR</ref>)<sp/>{</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;%s:<sp/>not<sp/>a<sp/>directory.\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>);</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((dt<sp/>=<sp/>fsfind(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>&amp;ino,<sp/>fd))<sp/>&lt;=<sp/>0)</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/>path<sp/>=<sp/>s;</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ino;</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>dt<sp/>==<sp/><ref refid="ufs_8h_1a9973595cf6775b1b29d7274ab4c0d623" kindref="member">DT_REG</ref><sp/>?<sp/>ino<sp/>:<sp/>0;</highlight></codeline>
<codeline lineno="265"><highlight class="normal">}</highlight></codeline>
<codeline lineno="266"><highlight class="normal"></highlight></codeline>
<codeline lineno="267"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ufs_openFile(</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="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>tmp[2];</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ino<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="270"><highlight class="normal"></highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1ad411e9a6fd040afcee6986c027d5a999" kindref="member">dmadat</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdmadat" kindref="compound">dmadat</ref><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdmadat" kindref="compound">dmadat</ref>));</highlight></codeline>
<codeline lineno="272"><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/>ino<sp/>=<sp/><ref refid="namei_8c_1ad77c16b56493b15a0ffa0f3aedbffb71" kindref="member">lookup</ref>(<ref refid="structfile" kindref="compound">file</ref>,<sp/>fd);</highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1af6a1235d2c373b43391f4da9b1dcc0be" kindref="member">ino</ref><sp/>=<sp/>ino;</highlight></codeline>
<codeline lineno="277"><highlight class="normal"></highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ino<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(fd-&gt;<ref refid="structfileDescriptor_1ad411e9a6fd040afcee6986c027d5a999" kindref="member">dmadat</ref>);</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(-1);</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="282"><highlight class="normal"></highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Quick<sp/>Hack<sp/>for<sp/>file<sp/>size<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/>fsread(fd-&gt;<ref refid="structfileDescriptor_1af6a1235d2c373b43391f4da9b1dcc0be" kindref="member">ino</ref>,<sp/>&amp;tmp,<sp/>1,<sp/>fd);</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1a09c5cd0d4979a70b8d7098319cd00b7c" kindref="member">offset</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/>fd-&gt;<ref refid="structfileDescriptor_1aaf1c61f69cb312867bcdf95896a74bdc" kindref="member">perms</ref><sp/>=<sp/>0x1;</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x1);</highlight></codeline>
<codeline lineno="290"><highlight class="normal">}</highlight></codeline>
<codeline lineno="291" refid="ufs_8c_1aeb87da3578100f42190deb78d191cf65" refkind="member"><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ufs_8c_1aeb87da3578100f42190deb78d191cf65" kindref="member">ufs_readFile</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data,<sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>offset,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>size)<sp/>{</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(fsread(fd-&gt;<ref refid="structfileDescriptor_1af6a1235d2c373b43391f4da9b1dcc0be" kindref="member">ino</ref>,<sp/>data,<sp/>size,<sp/>fd));</highlight></codeline>
<codeline lineno="294"><highlight class="normal">}</highlight></codeline>
<codeline lineno="295" refid="ufs_8c_1a352e2c889644d8d992445b347d1ffe41" refkind="member"><highlight class="normal"></highlight></codeline>
<codeline lineno="296"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ufs_8c_1a352e2c889644d8d992445b347d1ffe41" kindref="member">ufs_writeFile</ref>(<ref refid="structfileDescriptor" kindref="compound">fileDescriptor_t</ref><sp/>*fd,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data,<sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>offset,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>size)<sp/>{</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Writing<sp/>:)\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="299"><highlight class="normal">}</highlight></codeline>
<codeline lineno="300"><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"></highlight><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="302"><highlight class="comment"></highlight></codeline>
<codeline lineno="303"><highlight class="comment"><sp/>Function:<sp/>int<sp/>ufs_initialize()</highlight></codeline>
<codeline lineno="304"><highlight class="comment"></highlight></codeline>
<codeline lineno="305"><highlight class="comment"><sp/>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="306"><highlight class="comment"></highlight></codeline>
<codeline lineno="307"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="308" refid="ufs_8c_1ac2f26ec05df38049821476d41aeb1038" refkind="member"><highlight class="comment"></highlight></codeline>
<codeline lineno="309"><highlight class="comment"><sp/>*****************************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="310"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ufs_8c_1ac2f26ec05df38049821476d41aeb1038" kindref="member">ufs_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="311"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x1);</highlight></codeline>
<codeline lineno="313" refid="ufs_8h_1a349e4b7ceea770cd630e0297b693d59e" refkind="member"><highlight class="normal">}</highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="ufs_8c_1a349e4b7ceea770cd630e0297b693d59e" kindref="member">ufs_init</ref>()<sp/>{</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Build<sp/>our<sp/>ufs<sp/>struct<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfileSystem" kindref="compound">fileSystem</ref><sp/>ufs<sp/>=<sp/>{<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="comment">/*<sp/>prev<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="comment">/*<sp/>next<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="ufs_8c_1ac2f26ec05df38049821476d41aeb1038" kindref="member">ufs_initialize</ref>,<sp/></highlight><highlight class="comment">/*<sp/>vfsInitFS<sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="ufs_8c_1aeb87da3578100f42190deb78d191cf65" kindref="member">ufs_readFile</ref>,<sp/></highlight><highlight class="comment">/*<sp/>vfsRead<sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="ufs_8c_1a352e2c889644d8d992445b347d1ffe41" kindref="member">ufs_writeFile</ref>,<sp/></highlight><highlight class="comment">/*<sp/>vfsWrite<sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>ufs_openFile,<sp/></highlight><highlight class="comment">/*<sp/>vfsOpenFile<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="comment">/*<sp/>vfsUnlink<sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="comment">/*<sp/>vfsMakeDir<sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="comment">/*<sp/>vfsRemDir<sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/></highlight><highlight class="comment">/*<sp/>vfsSync<sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/>0xAA,<sp/></highlight><highlight class="comment">/*<sp/>vfsType<sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/>};<sp/></highlight><highlight class="comment">/*<sp/>UFS<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="329"><highlight class="normal"></highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="vfs_8c_1ad8cb9693ae7b6b9fc419efc975778338" kindref="member">vfsRegisterFS</ref>(ufs)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="331"><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/>UFS&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x1);</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//dmadat<sp/>=<sp/>(struct<sp/>dmadat<sp/>*)kmalloc(sizeof(struct<sp/>dmadat));</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="337"><highlight class="normal">}</highlight></codeline>
<codeline lineno="338"><highlight class="normal"></highlight></codeline>
<codeline lineno="339"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="340"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="341"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/fs/ufs/ufs.c"/>
  </compounddef>
</doxygen>
