#include <revolution/nand.h>
typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block );
s32 NANDSimpleSafeCloseAsync(NANDFileInfo *info, NANDCallback cb, NANDCommandBlock *block);
info |
Pointer to the NANDFileInfo structure (opened by NANDSimpleSafeOpen[Async]). |
cb |
Callback function to call when this function completes processing. |
block |
Command block structure to be passed to the callback function. |
When the request begins normally, returns NAND_RESULT_OK.
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: depending on the state of internal operations, this function 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 access the data below /tmp/sys used by the NANDSimpleSafe APIs.
Asynchronously closes a file in a manner that guarantees the atomic nature of the file updates. Files closed using this function must have been opened using NANDSimpleSafeOpen or NANDSimpleSafeOpenAsync. Appropriate permissions (both read and write) must be set for the parent directory of the file where the NANDSimpleSafe type of function is applied.
The callback function specified with this function may receive NAND_RESULT_ALLOC_FAILED or NAND_RESULT_BUSY.
NANDSimpleSafeOpen, NANDSimpleSafeOpenAsync, NANDSimpleSafeClose, NANDSimpleSafeCancel, NANDSimpleSafeCancelAsync
2007/05/09 Initial version.