<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.16"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>UbixOS: fs/ubixfs/block.c File Reference</title> <link href="../../tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../jquery.js"></script> <script type="text/javascript" src="../../dynsections.js"></script> <link href="../../navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../resize.js"></script> <script type="text/javascript" src="../../navtreedata.js"></script> <script type="text/javascript" src="../../navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</script> <link href="../../doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">UbixOS  <span id="projectnumber">2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.16 --> <script type="text/javascript" src="../../menudata.js"></script> <script type="text/javascript" src="../../menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('../../',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('d3/d1c/block_8c.html','../../');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">block.c File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include <<a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html">ubixfs/ubixfs.h</a>></code><br /> <code>#include <<a class="el" href="../../d6/db4/include_2vfs_2file_8h_source.html">vfs/file.h</a>></code><br /> <code>#include <<a class="el" href="../../d2/d29/mount_8h_source.html">vfs/mount.h</a>></code><br /> </div><div class="textblock"><div class="dynheader"> Include dependency graph for block.c:</div> <div class="dyncontent"> <div class="center"><img src="../../dd/d5a/block_8c__incl.png" border="0" usemap="#fs_2ubixfs_2block_8c" alt=""/></div> <map name="fs_2ubixfs_2block_8c" id="fs_2ubixfs_2block_8c"> <area shape="rect" title=" " alt="" coords="1604,5,1720,32"/> <area shape="rect" href="../../d9/d32/include_2ubixfs_2ubixfs_8h.html" title=" " alt="" coords="1297,80,1402,107"/> <area shape="rect" href="../../d6/db4/include_2vfs_2file_8h.html" title=" " alt="" coords="1436,752,1504,779"/> <area shape="rect" href="../../d2/d29/mount_8h.html" title=" " alt="" coords="1627,827,1715,853"/> <area shape="rect" href="../../d0/d27/include_2sys_2types_8h.html" title=" " alt="" coords="1019,1051,1110,1077"/> <area shape="rect" href="../../db/da9/include_2vfs_2vfs_8h.html" title=" " alt="" coords="1359,155,1426,181"/> <area shape="rect" href="../../d1/de9/dirCache_8h.html" title=" " alt="" coords="683,827,806,853"/> <area shape="rect" href="../../d4/d7e/include_2sys_2device_8h.html" title=" " alt="" coords="881,976,976,1003"/> <area shape="rect" href="../../d1/dd8/mpi_8h.html" title=" " alt="" coords="1756,603,1834,629"/> <area shape="rect" href="../../d0/d6f/__types_8h.html" title=" " alt="" coords="810,1275,908,1301"/> <area shape="rect" href="../../d9/dab/select_8h.html" title=" " alt="" coords="814,1125,907,1152"/> <area shape="rect" href="../../d6/d92/cdefs_8h.html" title=" " alt="" coords="997,1200,1086,1227"/> <area shape="rect" href="../../d6/d30/__timespec_8h.html" title=" " alt="" coords="549,1200,668,1227"/> <area shape="rect" href="../../df/dc5/__timeval_8h.html" title=" " alt="" coords="744,1200,849,1227"/> <area shape="rect" href="../../d6/da4/__sigset_8h.html" title=" " alt="" coords="873,1200,973,1227"/> <area shape="rect" href="../../db/dd5/thread_8h.html" title=" " alt="" coords="1508,827,1602,853"/> <area shape="rect" href="../../d1/df2/wait_8h.html" title=" " alt="" coords="832,901,931,928"/> <area shape="rect" href="../../d3/d7e/sysproto__posix_8h.html" title=" " alt="" coords="1274,677,1420,704"/> <area shape="rect" href="../../d7/d97/net_8h.html" title=" " alt="" coords="356,229,429,256"/> <area shape="rect" href="../../d3/d73/inode_8h.html" title=" " alt="" coords="1224,827,1307,853"/> <area shape="rect" href="../../df/d42/ufs_8h.html" title=" " alt="" coords="956,901,1026,928"/> <area shape="rect" href="../../d7/d0b/trap_8h.html" title=" " alt="" coords="1559,901,1639,928"/> <area shape="rect" href="../../df/d92/sys_2signal_8h.html" title=" " alt="" coords="1341,901,1433,928"/> <area shape="rect" href="../../d8/d01/resource_8h.html" title=" " alt="" coords="1216,1051,1324,1077"/> <area shape="rect" href="../../d6/d35/i386_2cpu_8h.html" title=" " alt="" coords="1556,976,1639,1003"/> <area shape="rect" href="../../d1/d7d/pipe__fs_8h.html" title=" " alt="" coords="1102,901,1190,928"/> <area shape="rect" href="../../d8/dff/msdos__fs_8h.html" title=" " alt="" coords="1214,901,1317,928"/> <area shape="rect" href="../../d9/d69/netif_8h.html" title=" " alt="" coords="353,304,432,331"/> <area shape="rect" href="../../dc/dba/opt_8h.html" title=" " alt="" coords="636,677,709,704"/> <area shape="rect" href="../../d6/d40/err_8h.html" title=" " alt="" coords="208,603,278,629"/> <area shape="rect" href="../../de/df7/ip__addr_8h.html" title=" " alt="" coords="509,453,606,480"/> <area shape="rect" href="../../d4/da4/def_8h.html" title=" " alt="" coords="520,603,592,629"/> <area shape="rect" href="../../d0/d35/pbuf_8h.html" title=" " alt="" coords="250,528,329,555"/> <area shape="rect" href="../../d9/d9b/stats_8h.html" title=" " alt="" coords="973,379,1057,405"/> <area shape="rect" href="../../d2/d78/lwipopts_8h.html" title=" " alt="" coords="718,752,821,779"/> <area shape="rect" href="../../db/d16/debug_8h.html" title=" " alt="" coords="603,752,694,779"/> <area shape="rect" href="../../d2/d2d/arch_8h.html" title=" " alt="" coords="515,827,595,853"/> <area shape="rect" href="../../dc/df0/cc_8h.html" title=" " alt="" coords="98,901,196,928"/> <area shape="rect" href="../../da/d28/kprintf_8h.html" title=" " alt="" coords="582,976,667,1003"/> <area shape="rect" href="../../d3/d24/kpanic_8h.html" title=" " alt="" coords="593,901,706,928"/> <area shape="rect" href="../../de/df7/time_8h.html" title=" " alt="" coords="45,976,145,1003"/> <area shape="rect" href="../../d1/da8/ip4__addr_8h.html" title=" " alt="" coords="634,528,738,555"/> <area shape="rect" href="../../d3/d7d/ip6__addr_8h.html" title=" " alt="" coords="506,528,610,555"/> <area shape="rect" href="../../d9/d9a/mem_8h.html" title=" " alt="" coords="914,603,998,629"/> <area shape="rect" href="../../df/dff/memp_8h.html" title=" " alt="" coords="970,453,1060,480"/> <area shape="rect" href="../../d6/d7f/memp__std_8h.html" title=" " alt="" coords="1028,528,1167,555"/> <area shape="rect" href="../../d5/d70/memp__priv_8h.html" title=" " alt="" coords="864,528,1004,555"/> <area shape="rect" href="../../d7/d00/sched_8h.html" title=" " alt="" coords="1740,677,1850,704"/> <area shape="rect" href="../../dd/d71/tty_8h.html" title=" " alt="" coords="1815,976,1906,1003"/> <area shape="rect" href="../../de/d9a/tss_8h.html" title=" " alt="" coords="1877,752,1953,779"/> </map> </div> </div> <p><a href="../../d3/d1c/block_8c_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a9611956bb9ed5acb26ab7bc9927f4ebb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d1c/block_8c.html#a9611956bb9ed5acb26ab7bc9927f4ebb">freeBlocks</a> (int block, <a class="el" href="../../d6/db4/include_2vfs_2file_8h.html#acc7b57f2d3766b4977ebbe64aa38608b">fileDescriptor_t</a> *fd)</td></tr> <tr class="separator:a9611956bb9ed5acb26ab7bc9927f4ebb"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa74ff712a9d02bb08f6421ce73358654"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d1c/block_8c.html#aa74ff712a9d02bb08f6421ce73358654">getFreeBlocks</a> (int count, <a class="el" href="../../d6/db4/include_2vfs_2file_8h.html#acc7b57f2d3766b4977ebbe64aa38608b">fileDescriptor_t</a> *fd)</td></tr> <tr class="separator:aa74ff712a9d02bb08f6421ce73358654"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a99dfa2e54401fafb70357a6632c4ef10"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d1c/block_8c.html#a99dfa2e54401fafb70357a6632c4ef10">syncBat</a> (struct <a class="el" href="../../d3/d57/structvfs__mountPoint.html">vfs_mountPoint</a> *mp)</td></tr> <tr class="separator:a99dfa2e54401fafb70357a6632c4ef10"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Function Documentation</h2> <a id="a9611956bb9ed5acb26ab7bc9927f4ebb"></a> <h2 class="memtitle"><span class="permalink"><a href="#a9611956bb9ed5acb26ab7bc9927f4ebb">◆ </a></span>freeBlocks()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int freeBlocks </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>block</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="../../d6/db4/include_2vfs_2file_8h.html#acc7b57f2d3766b4977ebbe64aa38608b">fileDescriptor_t</a> * </td> <td class="paramname"><em>fd</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d3/d1c/block_8c_source.html#l00078">78</a> of file <a class="el" href="../../d3/d1c/block_8c_source.html">block.c</a>.</p> <p class="reference">References <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00091">blockAllocationTableEntry::attributes</a>, <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00126">ubixFSInfo::blockAllocationTable</a>, <a class="el" href="../../d2/d29/mount_8h_source.html#l00072">vfs_mountPoint::fsInfo</a>, <a class="el" href="../../d6/db4/include_2vfs_2file_8h_source.html#l00065">fileDescriptor::mp</a>, <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00093">blockAllocationTableEntry::nextBlock</a>, and <a class="el" href="../../d3/d1c/block_8c_source.html#l00073">syncBat()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../d3/d1c/block_8c_a9611956bb9ed5acb26ab7bc9927f4ebb_cgraph.png" border="0" usemap="#d3/d1c/block_8c_a9611956bb9ed5acb26ab7bc9927f4ebb_cgraph" alt=""/></div> <map name="d3/d1c/block_8c_a9611956bb9ed5acb26ab7bc9927f4ebb_cgraph" id="d3/d1c/block_8c_a9611956bb9ed5acb26ab7bc9927f4ebb_cgraph"> <area shape="rect" title=" " alt="" coords="5,5,88,32"/> <area shape="rect" href="../../d3/d1c/block_8c.html#a99dfa2e54401fafb70357a6632c4ef10" title=" " alt="" coords="136,5,207,32"/> </map> </div> </div> </div> <a id="aa74ff712a9d02bb08f6421ce73358654"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa74ff712a9d02bb08f6421ce73358654">◆ </a></span>getFreeBlocks()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int getFreeBlocks </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="../../d6/db4/include_2vfs_2file_8h.html#acc7b57f2d3766b4977ebbe64aa38608b">fileDescriptor_t</a> * </td> <td class="paramname"><em>fd</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d3/d1c/block_8c_source.html#l00095">95</a> of file <a class="el" href="../../d3/d1c/block_8c_source.html">block.c</a>.</p> <p class="reference">References <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00091">blockAllocationTableEntry::attributes</a>, <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00128">ubixFSInfo::batEntries</a>, <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00126">ubixFSInfo::blockAllocationTable</a>, <a class="el" href="../../d2/d29/mount_8h_source.html#l00072">vfs_mountPoint::fsInfo</a>, <a class="el" href="../../d6/db4/include_2vfs_2file_8h_source.html#l00065">fileDescriptor::mp</a>, <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00093">blockAllocationTableEntry::nextBlock</a>, and <a class="el" href="../../d3/d1c/block_8c_source.html#l00073">syncBat()</a>.</p> <p class="reference">Referenced by <a class="el" href="../../dc/d20/directory_8c_source.html#l00092">ubixFSmkDir()</a>, and <a class="el" href="../../d2/d34/ubixfs_8c_source.html#l00229">writeUbixFS()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../d3/d1c/block_8c_aa74ff712a9d02bb08f6421ce73358654_cgraph.png" border="0" usemap="#d3/d1c/block_8c_aa74ff712a9d02bb08f6421ce73358654_cgraph" alt=""/></div> <map name="d3/d1c/block_8c_aa74ff712a9d02bb08f6421ce73358654_cgraph" id="d3/d1c/block_8c_aa74ff712a9d02bb08f6421ce73358654_cgraph"> <area shape="rect" title=" " alt="" coords="5,5,112,32"/> <area shape="rect" href="../../d3/d1c/block_8c.html#a99dfa2e54401fafb70357a6632c4ef10" title=" " alt="" coords="160,5,231,32"/> </map> </div> </div> </div> <a id="a99dfa2e54401fafb70357a6632c4ef10"></a> <h2 class="memtitle"><span class="permalink"><a href="#a99dfa2e54401fafb70357a6632c4ef10">◆ </a></span>syncBat()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void syncBat </td> <td>(</td> <td class="paramtype">struct <a class="el" href="../../d3/d57/structvfs__mountPoint.html">vfs_mountPoint</a> * </td> <td class="paramname"><em>mp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d3/d1c/block_8c_source.html#l00073">73</a> of file <a class="el" href="../../d3/d1c/block_8c_source.html">block.c</a>.</p> <p class="reference">References <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00126">ubixFSInfo::blockAllocationTable</a>, <a class="el" href="../../d2/d29/mount_8h_source.html#l00070">vfs_mountPoint::device</a>, <a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html#l00037">device_node::devInfo</a>, <a class="el" href="../../d2/d29/mount_8h_source.html#l00071">vfs_mountPoint::diskLabel</a>, <a class="el" href="../../d2/d29/mount_8h_source.html#l00072">vfs_mountPoint::fsInfo</a>, <a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html#l00051">device_interface::info</a>, <a class="el" href="../../d2/d29/mount_8h_source.html#l00073">vfs_mountPoint::partition</a>, <a class="el" href="../../db/d6d/structubixDiskLabel.html#aa97973cf7f0b67811080656e11c6385f">ubixDiskLabel::partitions</a>, <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00076">ubixDiskLabel::ubixPartitions::pBatSize</a>, <a class="el" href="../../d9/d32/include_2ubixfs_2ubixfs_8h_source.html#l00074">ubixDiskLabel::ubixPartitions::pOffset</a>, and <a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html#l00053">device_interface::write</a>.</p> <p class="reference">Referenced by <a class="el" href="../../d3/d1c/block_8c_source.html#l00078">freeBlocks()</a>, and <a class="el" href="../../d3/d1c/block_8c_source.html#l00095">getFreeBlocks()</a>.</p> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="../../dir_97b3d2b63ac216821c2d7a22ee0ab2b0.html">fs</a></li><li class="navelem"><a class="el" href="../../dir_6f2fca2f009cc310f5e5847ec35b89ed.html">ubixfs</a></li><li class="navelem"><a class="el" href="../../d3/d1c/block_8c.html">block.c</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.16 </li> </ul> </div> </body> </html>