28 #define FS_MAX_PATH (0x27F)
29 #define FS_MODE_LENGTH (0x10)
212 WUT_UNKNOWN_BYTES(0x38);
214 WUT_CHECK_SIZE(
FSFsm, 0x38);
218 WUT_UNKNOWN_BYTES(0x44);
227 WUT_UNKNOWN_BYTES(8);
250 WUT_UNKNOWN_BYTES(0x1444);
267 WUT_UNKNOWN_BYTES(0x1560 - 0x14CC);
272 WUT_UNKNOWN_BYTES(4);
300 WUT_CHECK_OFFSET(
FSClientBody, 0x14C4, lastDequeuedCommand);
305 WUT_CHECK_OFFSET(
FSClientBody, 0x15EC, isLastErrorWithoutVolume);
306 WUT_CHECK_OFFSET(
FSClientBody, 0x15F0, fsCmdHandlerMsg);
307 WUT_CHECK_OFFSET(
FSClientBody, 0x1600, lastMountSourceDevice);
308 WUT_CHECK_OFFSET(
FSClientBody, 0x1610, findMountSourceType);
315 WUT_UNKNOWN_BYTES(0x1700);
321 WUT_UNKNOWN_BYTES(0xA80);
337 WUT_UNKNOWN_BYTES(0x30);
339 WUT_CHECK_OFFSET(
FSStat, 0x00, flags);
340 WUT_CHECK_OFFSET(
FSStat, 0x04, mode);
341 WUT_CHECK_OFFSET(
FSStat, 0x08, owner);
342 WUT_CHECK_OFFSET(
FSStat, 0x0C, group);
343 WUT_CHECK_OFFSET(
FSStat, 0x10, size);
344 WUT_CHECK_OFFSET(
FSStat, 0x14, allocSize);
345 WUT_CHECK_OFFSET(
FSStat, 0x18, quotaSize);
346 WUT_CHECK_OFFSET(
FSStat, 0x20, entryId);
347 WUT_CHECK_OFFSET(
FSStat, 0x24, created);
348 WUT_CHECK_OFFSET(
FSStat, 0x2C, modified);
349 WUT_CHECK_SIZE(
FSStat, 0x64);
401 WUT_UNKNOWN_BYTES(0x96C);
403 WUT_UNKNOWN_BYTES(0x68);
418 WUT_UNKNOWN_BYTES(0x300);
425 WUT_UNKNOWN_BYTES(0x4);
430 WUT_UNKNOWN_BYTES(0x10);
431 char volumeLabel[128];
457 return (
FSClientBody *) ((((uint32_t) client) + 0x3F) & ~0x3F);
468 return (
FSCmdBlockBody *) ((((uint32_t) cmdBlock) + 0x3F) & ~0x3F);
588 uint32_t preallocSize,
599 uint32_t preallocSize,
FSClientBodyLink link
Link used for linked list of clients.
FSCmdBlock * block
FSCmdBlock which owns this result.
FSClient * client
Pointer to unaligned FSClient structure.
FSStatus status
The result of the command.
OSAlarm fsmAlarm
Alarm used by fsm for unknown reasons.
FSAsyncResult asyncResult
OSMessageQueue * ioMsgQueue
bool isLastErrorWithoutVolume
FSMessage fsCmdHandlerMsg
Message used to send FsCmdHandler message when FSA async callback is received.
FSError emulatedError
Emulated error, set with FSSetEmulatedError.
IOSHandle clientHandle
IOSHandle returned from fsaShimOpen.
FSCmdQueue cmdQueue
Command queue of FS commands.
char lastMountSourceDevice[0x10]
Device name of the last mount source returned by FSGetMountSourceNext.
FSMessage ioMsg
Message to put into asyncdata.ioMsgQueue.
OSFastMutex mutex
Mutex used to protect FSClientBody data.
FSMountSourceType findMountSourceType
Mount source type to find with FSGetMountSourceNext.
FSStateChangeCallback callback
FSAsyncData asyncData
User supplied async data.
FSCmdBlockBody * lastDequeuedCommand
The last dequeued command.
OSFunctionType type
Type of message.
FSError lastError
Error of last FS command.
FSError FSGetLastErrorCodeForViewer(FSClient *client)
FSStatus FSOpenFileEx(FSClient *client, FSCmdBlock *block, const char *path, const char *mode, FSMode createMode, FSOpenFileFlags openFlag, uint32_t preallocSize, FSFileHandle *handle, FSErrorFlag errorMask)
FSStatus FSGetVolumeInfoAsync(FSClient *client, FSCmdBlock *block, const char *path, FSVolumeInfo *volumeInfo, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSGetStatFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSStat *stat, FSErrorFlag errorMask, FSAsyncData *asyncData)
void FSInitCmdBlock(FSCmdBlock *block)
FSStatus FSReadFileAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSChangeModeAsync(FSClient *client, FSCmdBlock *block, const char *path, FSMode mode, FSMode modeMask, FSErrorFlag errorMask, FSAsyncData *asyncData)
void(* FSStateChangeCallback)(FSClient *, FSVolumeState, void *)
FSStatus FSUnmount(FSClient *client, FSCmdBlock *cmd, const char *target, FSErrorFlag errorMask)
FSStatus FSGetPosFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle fileHandle, uint32_t *pos, FSErrorFlag errorMask, FSAsyncData *asyncData)
static FSCmdBlockBody * FSGetCmdBlockBody(FSCmdBlock *cmdBlock)
Get an aligned FSCmdBlockBody from an FSCmdBlock.
FSStatus FSRemoveAsync(FSClient *client, FSCmdBlock *block, const char *path, FSErrorFlag errorMask, FSAsyncData *asyncData)
uint32_t FSDirectoryHandle
FSStatus FSGetFreeSpaceSizeAsync(FSClient *client, FSCmdBlock *block, const char *path, uint64_t *outSize, FSErrorFlag errorMask, FSAsyncData *asyncData)
uint32_t FSGetClientNum()
FSStatus FSRewindDir(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, FSErrorFlag errorMask)
FSAsyncResult * FSGetAsyncResult(FSMessage *message)
FSStatus FSOpenFile(FSClient *client, FSCmdBlock *block, const char *path, const char *mode, FSFileHandle *handle, FSErrorFlag errorMask)
FSStatus FSRemove(FSClient *client, FSCmdBlock *block, const char *path, FSErrorFlag errorMask)
FSStatFlags
Flags for FSStat.
static FSClientBody * FSGetClientBody(FSClient *client)
Get an aligned FSClientBody from an FSClient.
FSError FSGetLastError(FSClient *client)
FSStatus FSBindMount(FSClient *client, FSCmdBlock *cmd, const char *source, const char *target, FSErrorFlag errorMask)
FSStatus FSSetCmdPriority(FSCmdBlock *block, FSPriority priority)
FSStatus FSWriteFileWithPosAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSRenameAsync(FSClient *client, FSCmdBlock *block, const char *oldPath, const char *newPath, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSChangeDir(FSClient *client, FSCmdBlock *block, const char *path, FSErrorFlag errorMask)
FSStatus FSFlushFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSReadFileWithPos(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask)
FSStatus FSSetPosFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t pos, FSErrorFlag errorMask)
FSStatus FSAddClient(FSClient *client, FSErrorFlag errorMask)
FSStatus FSFlushFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSErrorFlag errorMask)
FSStatus FSTruncateFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSOpenFileAsync(FSClient *client, FSCmdBlock *block, const char *path, const char *mode, FSFileHandle *outHandle, FSErrorFlag errorMask, FSAsyncData *asyncData)
void FSSetStateChangeNotification(FSClient *client, FSStateChangeParams *info)
FSStatus FSReadFileWithPosAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSOpenDirAsync(FSClient *client, FSCmdBlock *block, const char *path, FSDirectoryHandle *handle, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSReadDir(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, FSDirectoryEntry *entry, FSErrorFlag errorMask)
FSStatus FSMount(FSClient *client, FSCmdBlock *cmd, FSMountSource *source, const char *target, uint32_t bytes, FSErrorFlag errorMask)
FSStatus FSWriteFileAsync(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSGetStat(FSClient *client, FSCmdBlock *block, const char *path, FSStat *stat, FSErrorFlag errorMask)
FSVolumeState FSGetVolumeState(FSClient *client)
FSStatus FSChangeMode(FSClient *client, FSCmdBlock *block, const char *path, FSMode mode, FSMode modeMask, FSErrorFlag errorMask)
FSStatus FSMakeDirAsync(FSClient *client, FSCmdBlock *block, const char *path, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSRename(FSClient *client, FSCmdBlock *block, const char *oldPath, const char *newPath, FSErrorFlag errorMask)
FSStatus FSCloseFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSGetStatFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSStat *stat, FSErrorFlag errorMask)
FSStatus FSGetVolumeInfo(FSClient *client, FSCmdBlock *block, const char *path, FSVolumeInfo *volumeInfo, FSErrorFlag errorMask)
FSStatus FSMakeDir(FSClient *client, FSCmdBlock *block, const char *path, FSErrorFlag errorMask)
FSStatus FSGetPosFile(FSClient *client, FSCmdBlock *block, FSFileHandle fileHandle, uint32_t *pos, FSErrorFlag errorMask)
FSStatus FSGetFreeSpaceSize(FSClient *client, FSCmdBlock *block, const char *path, uint64_t *outSize, FSErrorFlag errorMask)
FSStatus FSOpenFileExAsync(FSClient *client, FSCmdBlock *block, const char *path, const char *mode, FSMode createMode, FSOpenFileFlags openFlag, uint32_t preallocSize, FSFileHandle *handle, FSErrorFlag errorMask, FSAsyncData *asyncData)
void(* FSAsyncCallback)(FSClient *, FSCmdBlock *, FSStatus, uint32_t)
FSStatus FSReadDirAsync(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, FSDirectoryEntry *entry, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSDelClient(FSClient *client, FSErrorFlag errorMask)
FSStatus FSCloseDirAsync(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSCloseFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSErrorFlag errorMask)
FSStatus FSChangeDirAsync(FSClient *client, FSCmdBlock *block, const char *path, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSCloseDir(FSClient *client, FSCmdBlock *block, FSDirectoryHandle handle, FSErrorFlag errorMask)
FSStatus FSWriteFile(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask)
FSStatus FSReadFile(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask)
FSStatus FSGetStatAsync(FSClient *client, FSCmdBlock *block, const char *path, FSStat *stat, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSSetPosFileAsync(FSClient *client, FSCmdBlock *block, FSFileHandle handle, uint32_t pos, FSErrorFlag errorMask, FSAsyncData *asyncData)
FSStatus FSGetMountSource(FSClient *client, FSCmdBlock *cmd, FSMountSourceType type, FSMountSource *out, FSErrorFlag errorMask)
FSStatus FSGetCwd(FSClient *client, FSCmdBlock *block, char *buffer, uint32_t bufferSize, FSErrorFlag errorMask)
FSStatus FSOpenDir(FSClient *client, FSCmdBlock *block, const char *path, FSDirectoryHandle *handle, FSErrorFlag errorMask)
void FSTimeToCalendarTime(FSTime time, OSCalendarTime *outCalendarTime)
File times aren't always available in which case it returns the default 1980-01-01.
FSStatus FSBindUnmount(FSClient *client, FSCmdBlock *cmd, const char *target, FSErrorFlag errorMask)
FSStatus FSWriteFileWithPos(FSClient *client, FSCmdBlock *block, uint8_t *buffer, uint32_t size, uint32_t count, uint32_t pos, FSFileHandle handle, uint32_t unk1, FSErrorFlag errorMask)
FSStatus FSTruncateFile(FSClient *client, FSCmdBlock *block, FSFileHandle handle, FSErrorFlag errorMask)
@ FS_ERROR_FLAG_PERMISSION_ERROR
@ FS_ERROR_FLAG_NOT_FOUND
@ FS_ERROR_FLAG_UNSUPPORTED_CMD
@ FS_ERROR_FLAG_STORAGE_FULL
@ FS_ERROR_FLAG_JOURNAL_FULL
@ FS_ERROR_FLAG_ALREADY_OPEN
@ FS_ERROR_FLAG_FILE_TOO_BIG
@ FS_ERROR_FLAG_ACCESS_ERROR
@ FS_OPEN_FLAG_NONE
Open file normally.
@ FS_OPEN_FLAG_UNENCRYPTED
Open (new) unencrypted file. Used for vWii files since it allows for direct access without the Wii U ...
@ FS_OPEN_FLAG_PREALLOC_SIZE
Preallocates new file size using given size.
@ FS_STATUS_UNSUPPORTED_CMD
@ FS_STATUS_PERMISSION_ERROR
@ FS_STATUS_MEDIA_NOT_READY
@ FS_STAT_FILE
The retrieved file entry is a (link to a) file.
@ FS_STAT_LINK
The retrieved file entry also is a link to a different file on the filesystem.
@ FS_STAT_QUOTA
The retrieved file entry also has a quota set.
@ FS_STAT_ENCRYPTED_FILE
The retrieved file entry also is encrypted and can't be opened (see vWii files for example).
@ FS_STAT_DIRECTORY
The retrieved file entry is a (link to a) directory.
@ FS_MEDIA_STATE_NO_MEDIA
@ FS_MEDIA_STATE_INVALID_MEDIA
@ FS_MEDIA_STATE_MEDIA_ERROR
@ FS_MEDIA_STATE_DIRTY_MEDIA
@ FS_VOLUME_STATE_INVALID_MEDIA
@ FS_VOLUME_STATE_JOURNAL_FULL
@ FS_VOLUME_STATE_DIRTY_MEDIA
@ FS_VOLUME_STATE_DATA_CORRUPTED
@ FS_VOLUME_STATE_WRONG_MEDIA
@ FS_VOLUME_STATE_NO_MEDIA
@ FS_VOLUME_STATE_WRITE_PROTECTED
@ FS_VOLUME_STATE_MEDIA_ERROR
@ FS_VOLUME_STATE_INITIAL
@ FS_VOLUME_STATE_INVALID
@ FS_ERROR_DATA_CORRUPTED
@ FS_ERROR_UNSUPPORTED_COMMAND
@ FS_ERROR_MEDIA_NOT_READY
@ FS_ERROR_PERMISSION_ERROR
@ FS_ERROR_INVALID_FILEHANDLE
@ FS_ERROR_MAX_MOUNT_POINTS
@ FS_ERROR_INVALID_DIRHANDLE
@ FS_ERROR_INVALID_ALIGNMENT
@ FS_ERROR_INVALID_BUFFER
@ FS_ERROR_INVALID_CLIENTHANDLE
@ FS_ERROR_ALREADY_EXISTS
@ FS_ERROR_OUT_OF_RESOURCES
@ FS_ERROR_WRITE_PROTECTED
@ FS_ERROR_UNAVAILABLE_COMMAND
Stores the result of an async FS command.
Link entry used for FSClientBodyQueue.
Same as std c struct tm but with msec and usec added.