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=utf-8">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>CNTGetFSTSize</title>
9</head>
10
11<body>
12
13<h1>CNTGetFSTSize</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/cnt.h&gt;
18
19s32 CNTGetFSTSize(u32 contentIdx, u32* size);
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>contentIdx</EM></STRONG></CODE></TD>
27<TD width="520">Number of the content file whose FST size is to be obtained. Must be in the range of 2 to 511.</TD>
28  </tr>
29<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>size</EM></STRONG></CODE></TD>
30<TD width="520">Pointer to the variable that stores the size.</TD>
31  </tr>
32</TABLE>
33</p>
34
35<h2>Return Values</h2>
36<p>
37For a NAND application, returns one of the following codes:
38<p>
39<code>CNT_RESULT_OK<br> CNT_RESULT_ACCESS<br> CNT_RESULT_AUTHENTICATION<br> CNT_RESULT_CORRUPT<br> CNT_RESULT_ECC_CRIT<br> CNT_RESULT_INVALID<br> CNT_RESULT_MAXFD<br> CNT_RESULT_OUT_OF_MEMORY<br> CNT_RESULT_UNKNOWN<br> CNT_RESULT_FATAL<br></code>
40</p>
41</p>
42<p>
43For disc applications, returns <code>CNT_RESULT_INVALID</code> if the <CODE>/content{index}</CODE> directory does not exist under <CODE>DvdRoot</CODE>.
44</p>
45
46<H2>Description</H2>
47<p>
48Gets the size of the FST of a content file. This is the size allocated from the memory allocator when <CODE>CNTInitHandle</CODE> is executed. By calling this function before initialization by <CODE>CNTInitHandle</CODE>, it is possible to check the required memory size.<br>An archive's FST size may also be obtained statically by darch.exe. Click <a href="../arc/intro.html">here</a> for details on archives. <br><br><B>Note:</B> This function sometimes puts the current thread to sleep, so it cannot be called from callback functions. See <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.
49</p>
50
51<H2>Note</H2>
52<p>
53The FST size is calculated with the assumption that archiving was performed with the method shown below. This is the same method as used with disc applications when <CODE>CNT_IDX</CODE> is specified in the <CODE>make</CODE> options (defined in <CODE>build/buildtools/modulerules</CODE>). <br>If you use a content file that was archived using any other method, the value that you obtain with this function may be different for disc applications and NAND applications. <br><br>
54<table border="1" width="100%">
55<tbody>
56<tr>
57<td width="100%">
58<pre><code>
59% cd $REVOLUTION_SDK_ROOT/dvddata/content{n}
60% darch -c * ../archives/content{n}.arc
61</code></pre>
62</td>
63</tr>
64</tbody>
65</table>
66</p>
67
68<h2>See Also</h2>
69<p>
70<a href="./CNTInitHandle.html"><CODE>CNTInitHandle</CODE></a><br> <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>
71</p>
72<H2>Revision History</H2>
73<p>
742009/01/15 Changed <CODE>darchD</CODE> to <CODE>darch</CODE>.<BR>2007/11/20 Standardized the use of the term &quot;content file&quot;.<BR>2007/09/12 Added information about the sleep status of threads.<br>2007/05/02 Initial version.
75</p>
76
77<hr><p>CONFIDENTIAL</p></body>
78</html>
79