NANDSimpleSafeCancel

Syntax

#include <revolution/nand.h>

s32 NANDSimpleSafeCancel( NANDFileInfo *info );

Arguments

info Pointer to a NANDFileInfo structure.

Return Values

Returns NAND_RESULT_OK if the resource is deallocated normally.

NAND_RESULT_OK
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_CORRUPT
NAND_RESULT_INVALID
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR

Description

This function will try to release the resources (temporary files and file descriptors) that were used by the NANDSimpleSafe-type functions. Call this function when any NANDSimpleSafe-type function (except NANDSimpleSafeCancel[Async]) ends in a NAND_RESULT_AUTHENTICATION or NAND_RESULT_CRIT error, or when a NAND_RESULT_AUTHENTICATION or NAND_RESULT_ECC_CRIT error occurs when reading or writing a file that was opened by a NANDSimpleSafe-type function. For more information, see Error Processing When Using NANDSimpleSafe-type Functions. When NANDSimpleSafeCancel returns an error, process the error in accordance with Error Processing After Starting Application.

It is not necessary to apply NANDSimpleSafeClose[Async] to the NANDFileInfo structure passed to this function.

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

This function updates the FAT of Wii console NAND memory. However, the FAT will not be updated if this is run when NANDSimpleSafe-type functions have not returned an error.

See Also

NANDSimpleSafeCancelAsync, NANDSimpleSafeOpen, NANDSimpleSafeOpenAsync, NANDSimpleSafeClose, NANDSimpleSafeCloseAsync, Interrupts and Callback Functions

Revision History

2008/08/01 Added an explanation related to FAT updates.
2008/05/26 In Description, revised the conditions for calling this function.
2007/09/25 Added information about the sleep status of threads.
2007/05/09 Initial version.


CONFIDENTIAL