NANDGetAvailableAreaAsync

C Specification


#include <revolution/nand.h>

typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block );

s32 NANDGetAvailableAreaAsync( u32 *fsBlock, u32 *inode, NANDCallback cb, NANDCommandBlock *block );

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).
cb Callback function to call when this function completes processing.
block Command block structure to be passed to the callback function.

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 asynchronously 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 provides the same features as NANDCheckAsync. Use this function when creating new files and directories if you want to inform the player about the availability in Wii console NAND memory.

See Also

NANDGetAvailableArea, NANDCheck, NANDCheckAsync, NANDFreeBlocks, NANDFreeBlocksAsync

Revision History

2006/11/30 Deleted text about alternatives to NANDCheck[Async].
2006/10/25 Initial version.


CONFIDENTIAL