Use of this function is not recommended. If possible, consider using the NANDSimpleSafe version of this API.
#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 NANDSafeOpen[Async]). |
cb |
Callback function to call when this function completes processing. |
block |
Command block structure to be passed to the callback function. |
Returns NAND_RESULT_OK when the request begins normally.
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: Because this function performs delete operations internally, it may potentially return NAND_RESULT_OPENFD. Nevertheless, NAND_RESULT_OPENFD is not returned as long as there are no illegal operations, such as the application program attempting to directly create a file below /tmp/sys used by NANDSafe APIs.
Asynchronously closes a file. Files closed using this function must have been opened using NANDSafeOpen or NANDSafeOpenAsync. Appropriate permissions (both read and write) must be set for the parent directory of the file where the NANDSafe-type 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 most NAND asynchronous functions, a callback function specified with this function may receive NAND_RESULT_ALLOC_FAILED or NAND_RESULT_BUSY.
NANDSafeOpen, NANDSafeOpenAsync, NANDSafeClose
2007/05/09 Noted that the use of this function is not recommended.
2007/02/xx Added a note for the result code NAND_RESULT_MAXDEPTH.
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 NAND_RESULT_OPENFD result code.
2006/08/15 Initial version.