NANDGetAvailableArea

C Specification


#include <revolution/nand.h>

s32 NANDGetAvailableArea( u32 *fsBlock, u32 *inode );

Arguments

fsBlock Pointer to a u32 type variable. Stores the usable FS block count (0 =< *fsBlock =< 1024).
inode Pointer to a u32 type variable. Stores the usable inode count (0 =< *inode =< 32).

Return Values

Returns one of the following codes:

NAND_RESULT_OK
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_INVALID
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR

Description

Obtains 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.

This function essentially provide the same features as NANDCheck. Use this function when creating new files and directories if you want to inform the player about the availability in Wii console NAND memory.

This function may put the current thread to sleep. For precautions when calling similar functions, refer to Interrupts and Callback Functions.

See Also

NANDGetAvailableAreaAsync, NANDCheck, NANDCheckAsync, NANDFreeBlocks, NANDFreeBlocksAsync , Interrupts and Callback Functions

Revision History

2007/09/25 Added information on the sleep status of threads.
2006/11/30 Added NAND_RESULT_ALLOC_FAILED and NAND_RESULT_BUSY codes.
2006/11/30 Deleted text about being an alternative to NANDCheck[Async].
2006/10/25 Initial version.


CONFIDENTIAL