#include <revolution/nand.h>
#define NAND_SEEK_SET 0
#define NAND_SEEK_CUR 1
#define NAND_SEEK_END 2
s32 NANDSeek(NANDFileInfo *info, s32 offset, s32 whence);
info |
Pointer to a NANDFileInfo structure. |
||||||
offset |
Specifies the offset value The size is given in bytes. | ||||||
whence |
Specifies the seek base position.
|
Returns the seek target position when seek is successful. When seek fails, one of the following codes is returned:
NAND_RESULT_ACCESS
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_INVALID
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR
Does a file seek. The start position of the next read/write is the offset plus whence. If the offset value is positive, the seek position moves from the base point to the end of the file. If the value is negative, the seek position moves from the base point toward the start of the file.
This function may put the current thread to sleep. For precautions when calling similar functions, refer to Interrupts and Callback Functions.
NANDSeekAsync, NANDRead, NANDReadAsync, NANDWrite, NANDWriteAsync, Interrupts and Callback Functions
2007/09/25 Added information on the sleep status of threads.
2006/11/30 Added NAND_RESULT_ALLOC_FAILED and NAND_RESULT_BUSY codes.
2006/06/16 Initial version.
CONFIDENTIAL