#include <revolution/cnt.h>
s32 CNTGetFSTSize(u32 contentIdx, u32* size);
contentIdx |
Number of the content file whose FST size is to be obtained. Must be in the range of 2 to 511. | size |
Pointer to the variable that stores the size. |
For a NAND application, returns one of the following codes:
CNT_RESULT_OK
CNT_RESULT_ACCESS
CNT_RESULT_AUTHENTICATION
CNT_RESULT_CORRUPT
CNT_RESULT_ECC_CRIT
CNT_RESULT_INVALID
CNT_RESULT_MAXFD
CNT_RESULT_OUT_OF_MEMORY
CNT_RESULT_UNKNOWN
CNT_RESULT_FATAL
For disc applications, returns CNT_RESULT_INVALID if the /content{index} directory does not exist under DvdRoot.
Gets the size of the FST of a content file. This is the size allocated from the memory allocator when CNTInitHandle is executed. By calling this function before initialization by CNTInitHandle, it is possible to check the required memory size.
An archive's FST size may also be obtained statically by darch.exe. Click here for details on archives.
Note: This function sometimes puts the current thread to sleep, so it cannot be called from callback functions. See Interrupts and Callback Functions.
The 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 CNT_IDX is specified in the make options (defined in build/buildtools/modulerules).
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.
|
CNTInitHandle
Interrupts and Callback Functions
2009/01/15 Changed darchD to darch.
2007/11/20 Standardized the use of the term "content file".
2007/09/12 Added information about the sleep status of threads.
2007/05/02 Initial version.
CONFIDENTIAL