NANDGetAvailableAreaAsync

Syntax

#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 i-node 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

The result codes that may be returned by NANDGetAvailableAreaAsync are listed below. Returns NAND_RESULT_OK when the request begins normally.

NAND_RESULT_OK
NAND_RESULT_ACCESS
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_INVALID
NAND_RESULT_FATAL_ERROR

The result codes that may be passed to the callback function are listed below.

NAND_RESULT_OK
NAND_RESULT_INVALID
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR

Description

Asynchronously gets the upper limit of the FS block count and the i-node 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 i-nodes, 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 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

2008/08/01 Revised the result codes that are passed to the callback function.
2008/05/13 Described the result codes passed to the callback function.
2006/11/30 Deleted text about being an alternative to NANDCheck[Async].
2006/10/25 Initial version.


CONFIDENTIAL