CNTGetFSTSize

Syntax


#include <revolution/cnt.h>

s32 CNTGetFSTSize(u32 contentIdx, u32* size);

Arguments

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.

Return Values

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.

Description

This function can be used to get 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 darchD.exe. Click here for details on archives.

Note: This function may put the current thread to sleep. Refer to Interrupts and Callback Functions.

Note

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.


% cd $REVOLUTION_SDK_ROOT/dvddata/content{n}
% darchD -c * ../archives/content{n}.arc

See Also

CNTInitHandle
Interrupts and Callback Functions

Revision History

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