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>NANDGetAvailableArea</title>
9</head>
10
11<body>
12
13<h1>NANDGetAvailableArea</h1>
14
15<h2>C Specification</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/nand.h&gt;
18
19s32 NANDGetAvailableArea( u32 *fsBlock, u32 *inode );
20</code></pre></dd></dl>
21
22<h2>Arguments</h2>
23<p>
24<TABLE border="1" >
25  <tr>
26<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>fsBlock</EM></STRONG></CODE></TD>
27<TD width="520">Pointer to a u32 type variable. Stores the usable FS block count (0 =&lt; *fsBlock =&lt; 1024).</TD>
28  </tr>
29  <tr>
30<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>inode</EM></STRONG></CODE></TD>
31<TD width="520">Pointer to a u32 type variable. Stores the usable inode count (0 =&lt; *inode =&lt; 32).</TD>
32  </tr>
33</TABLE>
34</p>
35
36
37<h2>Return Values</h2>
38<p>
39Returns one of the following codes:
40<p>
41<code>NAND_RESULT_OK<br> NAND_RESULT_ALLOC_FAILED<br> NAND_RESULT_BUSY<br> NAND_RESULT_INVALID<br> NAND_RESULT_UNKNOWN<br> NAND_RESULT_FATAL_ERROR<br></code>
42</p>
43</p>
44
45<h2>Description</h2>
46<p>
47Obtains the upper limit of the FS block count and the inode count of the file/directory that can be created by the application program (under the home directory). The upper limit in the home directory is set to 16MB and 32 inodes, respectively. The range of values that can be obtained through this function will be as shown in the above table. Even if the application has not created anything in the home directory, the value obtained through this function will be small if most of the user area is used by other applications.
48</p>
49<p>
50This function essentially provide the same features as <a href="./NANDCheck.html">NANDCheck</a>. Use this function when creating new files and directories if you want to inform the player about the availability in Wii console NAND memory.
51</p>
52
53<p>
54This function may put the current thread to sleep. For precautions when calling similar functions, refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.
55</p>
56
57<h2>See Also</h2>
58<p>
59<code><a href="./NANDGetAvailableAreaAsync.html">NANDGetAvailableAreaAsync</a></code>, <code><a href="./NANDCheck.html">NANDCheck</a></code>, <code><a href="./NANDCheckAsync.html">NANDCheckAsync</a></code>, <code><a href="./NANDFreeBlocks.html">NANDFreeBlocks</a></code>, <code><a href="./NANDFreeBlocksAsync.html">NANDFreeBlocksAsync</a></code>
60, <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a></p>
61
62<h2>Revision History</h2>
63<p>
642007/09/25 Added information on the sleep status of threads.<br>2006/11/30 Added <CODE>NAND_RESULT_ALLOC_FAILED</CODE> and <CODE>NAND_RESULT_BUSY</CODE> codes.<br>2006/11/30 Deleted text about being an alternative to <CODE>NANDCheck[Async]</CODE>.<br>2006/10/25 Initial version.<br>
65</p>
66
67<hr><p>CONFIDENTIAL</p></body>
68</html>
69