Use of this function is not recommended. If possible, consider using NANDSimpleSafe-related functions.
#include <revolution/nand.h> typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block ); s32 NANDSafeCloseAsync( NANDFileInfo *info, NANDCallback cb, NANDCommandBlock *block );
| info | (Pointer to the NANDFileInfo structure (opened by the NANDSafeOpen[Async] function) |
|---|---|
| cb | Callback function to call when this function completes processing. |
| block | Command block structure to be passed to the callback function. |
The result codes that may be returned by NANDSafeCloseAsync 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_ACCESS
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_CORRUPT
NAND_RESULT_INVALID
NAND_RESULT_OPENFD
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR
Note: It is possible that this function may return NAND_RESULT_OPENFD because it performs deletion operations internally. However, NAND_RESULT_OPENFD will not be returned if the application does not perform an illegal operation, such as directly create files under the /tmp/sys directory used by NANDSafe-related functions.
Asynchronously closes a file. Files closed using this function must have been opened using either the NANDSafeOpen function or the NANDSafeOpenAsync function. Appropriate permissions (both read and write) must be set for the parent directory of the file where the NANDSafe-related function is applied. NAND_RESULT_BUSY is returned and this function call is denied when the queue for accepting requests inside the library is full.
Unlike a large number of asynchronous NAND functions, the callback specified with this function might receive NAND_RESULT_ALLOC_FAILED or NAND_RESULT_BUSY when NAND_ACCESS_WRITE or NAND_ACCESS_RW is specified for accType when opening a file.
This function updates the Wii console NAND memory's FAT.
NANDSafeOpen, NANDSafeOpenAsync, NANDSafeClose
2008/07/29 Added information regarding the result code that the callback function might receive.
2008/05/13 Added description of the result codes passed to the callback function.
2008/04/23 Added mention of updating the FAT.
2007/05/09 Noted that the use of this function is not recommended.
2007/02/xx Added a note for the NAND_RESULT_OPENFD result code.
2006/09/19 Added information regarding the result code that the callback function may receive.
2006/09/08 Added a requirement for the parent directory permissions.
2006/08/30 Added the NAND_RESULT_OPENFD result code.
2006/08/15 Initial version.
CONFIDENTIAL