1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>NANDFreeBlocks</title> 9</head> 10 11<body> 12 13<h1>NANDFreeBlocks</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction">#include <revolution/nand.h> 17 18s32 NANDFreeBlocks(u32 *bytes, u32 *inodes); 19</pre></dd></dl> 20 21<h2>Arguments</h2> 22<p> 23<TABLE class="arguments" border="1" > 24 <tr> 25<TH>bytes</TH> 26<TD>Pointer to a u32-type variable that stores the file system's available space (in bytes).</TD> 27 </tr> 28 <tr> 29<TH>inodes</TH> 30<TD>Pointer to a u32-type variable that stores the number of free inodes in the file system.</TD> 31 </tr> 32</TABLE> 33</p> 34 35<h2>Return Values</h2> 36<p> 37Returns one of the following codes. 38<p> 39<code> 40NAND_RESULT_OK<br> 41NAND_RESULT_ALLOC_FAILED<br> 42NAND_RESULT_BUSY<br> 43NAND_RESULT_INVALID<br> 44NAND_RESULT_UNKNOWN<br> 45NAND_RESULT_FATAL_ERROR<br> 46</code> 47</p> 48</p> 49 50<H2>Description</H2> 51<p> 52Obtains the file system's available free space (in bytes) and the number of free inodes. However, <font color="ff0000">you cannot use this function to determine whether new files or directories can be created</font>. (This serves to protect the free space reserved by the system.) To determine whether new files and directories can be created, use the <code>NANDCheck[Async]</code> or <code>NANDGetAvailableArea[Async]</code> function. 53</p> 54 55<p> 56This function may put the current thread to sleep. For precautions related to calling similar functions, see <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>. 57</p> 58 59<h2>See Also</h2> 60<p class="reference"> 61<a href="./NANDFreeBlocksAsync.html">NANDFreeBlocksAsync</a>, 62<a href="./NANDCheck.html">NANDCheck</a>, 63<a href="./NANDCheckAsync.html">NANDCheckAsync</a>, 64<a href="./NANDGetAvailableArea.html">NANDGetAvailableArea</a>, 65<a href="./NANDGetAvailableAreaAsync.html">NANDGetAvailableAreaAsync</a>, 66<a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a> 67</p> 68 69<H2>Revision History</H2> 70<p> 712007/09/25 Added information about the sleep status of threads.<br>2006/11/30 Added the <CODE>NAND_RESULT_ALLOC_FAILED</CODE> and <CODE>NAND_RESULT_BUSY</CODE> codes.<br>2006/10/25 Added a reference to <CODE>NANDGetAvailableArea[Async]</CODE>. Added links to <B>See Also</B>.<br>2006/08/30 Added a note regarding the creation of new files and directories.<BR>2006/06/16 Initial version.<BR> 72</p> 73 74<hr><p>CONFIDENTIAL</p></body> 75</html>