The processing sequence shown here is just one example. The application does not need to follow this exactly.
NANDSimpleSafe-type functions (or NANDSafe-type functions, which are not recommended). Refer to Figure 3 and its explanation.
NAND_RESULT_CORRUPT error code indicates that all Wii system memory has been corrupted to an irreparable state. If all Wii system memory has been corrupted, you also cannot expect the Wii to restart. Therefore, if this error is encountered, not only must you stop any application program processes, but also disable the reset/shutdown processes (which are normally enabled) that correspond to the RESET/POWER buttons, and as much as possible give first priority to notifying the player of the contents of this error message.
NAND_RESULT_MAXBLOCKS and NAND_RESULT_MAXFILES errors should not occur as long as the application adheres to NAND-related restrictions (for example, on home and /tmp directory usage). Consequently, the appearance of these error codes suggests that a bug may exist in the application or system program. Since system behavior cannot be guaranteed in this state, we recommend that when an error code of NAND_RESULT_MAXBLOCKS or NAND_RESULT_MAXFILES is encountered you display the prescribed error message and do not let control return to the original processing routine for the application program.
NAND_RESULT_UNKNOWN or an unexpected error code is strongly suspected to be an SDK bug. As you might expect, the system's operation cannot be guaranteed if these errors are encountered, so we recommend that you display the prescribed error message and do not let control return to the original processing routine of the application program.
NAND_RESULT_CORRUPT, NAND_RESULT_MAXBLOCKS, NAND_RESULT_MAXFILES, NAND_RESULT_BUSY or NAND_RESULT_ALLOC_FAILED. See the description of Figure 2.
NAND_RESULT_ECC_CRIT or NAND_RESULT_AUTHENTICATION is returned from a call to the NANDSimpleSafeOpen[Async] functions, the original file may be corrupted. As a result, after calling the NANDSimpleSafeCancel[Async] functions to deallocate resources, proceed to notify the player that the save file has been corrupted, and ask for confirmation to delete the file (refer to Figure 2).
NAND_RESULT_ECC_CRIT or NAND_RESULT_AUTHENTICATION is returned from a call to the NANDRead[Async] or NANDWrite[Async] functions in the center of Figure 3, this indicates that the temporary files created internally by the NANDSimpleSafe-type functions are corrupted (the content of the original file is most likely unchanged). In contrast to the above case, do not proceed directly to the confirmation of deletion of the damaged file; instead, redo the save process from the beginning.
2007/06/xx Revised Figure 2. Added the flow of NAND_RESULT_UNKNOWN and of unexpected result codes.
2007/05/09 Added an explanation for each figure.
2007/05/09 Added a figure for the error processing sequence when NANDSimpleSafe-related functions are in use.
2007/05/09 Moved the explanation for supplementary items.
2007/02/xx Added a supplementary note concerning the case in which both free space and free i-nodes are insufficient at the same time.
2006/11/30 Added support for the error codes NAND_RESULT_ALLOC_FAILED, NAND_RESULT_MAXBLOCKS and NAND_RESULT_MAXFILES.
2006/09/19 Standardized terminology. Deleted the word 'entry.'
2006/08/30 Initial version.
CONFIDENTIAL