wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
filesystem_fsa.h
Go to the documentation of this file.
1#pragma once
2
3#include "wut.h"
4#include "filesystem.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef uint32_t FSACommand;
11typedef uint16_t FSAIpcRequestType;
13typedef uint32_t FSAFileHandle;
14typedef uint32_t FSADirectoryHandle;
15typedef uint32_t FSAEntryNum;
18typedef uint32_t FSAFilePosition;
19
21
54
55
56typedef struct FSARequest FSARequest;
67
68typedef struct FSAResponse FSAResponse;
76
77typedef void (*FSAAsyncCallbackFn)(FSError result,
78 FSACommand command,
79 FSARequest *request,
80 FSAResponse *response,
81 void *userContext);
82
87 WUT_UNKNOWN_BYTES(0x14);
88};
89WUT_CHECK_SIZE(FSABlockInfo, 0x14);
90
95 WUT_UNKNOWN_BYTES(0x08);
98 WUT_UNKNOWN_BYTES(0x14);
99};
100WUT_CHECK_OFFSET(FSADeviceInfo, 0x08, deviceSizeInSectors);
101WUT_CHECK_OFFSET(FSADeviceInfo, 0x10, deviceSectorSize);
102WUT_CHECK_SIZE(FSADeviceInfo, 0x28);
103
108 WUT_UNKNOWN_BYTES(0x1E);
109};
110WUT_CHECK_SIZE(FSAFileSystemInfo, 0x1E);
111
118
130
135
140
145{
146 uint64_t titleId;
147 uint32_t processId;
148 uint32_t groupId;
149};
150WUT_CHECK_OFFSET(FSAProcessInfo, 0x00, titleId);
151WUT_CHECK_OFFSET(FSAProcessInfo, 0x08, processId);
152WUT_CHECK_OFFSET(FSAProcessInfo, 0x0C, groupId);
153WUT_CHECK_SIZE(FSAProcessInfo, 0x10);
154
156 char path[0x280];
157};
158WUT_CHECK_OFFSET(FSARequestRawOpen, 0x0, path);
159WUT_CHECK_SIZE(FSARequestRawOpen, 0x280);
160
162 int32_t handle;
163};
164WUT_CHECK_OFFSET(FSARequestRawClose, 0x0, handle);
165WUT_CHECK_SIZE(FSARequestRawClose, 0x04);
166
167struct WUT_PACKED FSARequestRawRead {
168 WUT_UNKNOWN_BYTES(0x4);
170 uint32_t count;
171 uint32_t size;
173};
174WUT_CHECK_OFFSET(FSARequestRawRead, 0x04, blocks_offset);
175WUT_CHECK_OFFSET(FSARequestRawRead, 0x0C, count);
176WUT_CHECK_OFFSET(FSARequestRawRead, 0x10, size);
177WUT_CHECK_OFFSET(FSARequestRawRead, 0x14, device_handle);
178WUT_CHECK_SIZE(FSARequestRawRead, 0x18);
179
180struct WUT_PACKED FSARequestRawWrite {
181 WUT_UNKNOWN_BYTES(0x4);
183 uint32_t count;
184 uint32_t size;
186};
187WUT_CHECK_OFFSET(FSARequestRawWrite, 0x04, blocks_offset);
188WUT_CHECK_OFFSET(FSARequestRawWrite, 0x0C, count);
189WUT_CHECK_OFFSET(FSARequestRawWrite, 0x10, size);
190WUT_CHECK_OFFSET(FSARequestRawWrite, 0x14, device_handle);
191WUT_CHECK_SIZE(FSARequestRawWrite, 0x18);
192
197{
198 uint32_t size;
199 uint32_t count;
201 uint32_t unk0x0C;
202};
203WUT_CHECK_OFFSET(FSARequestAppendFile, 0x0, size);
204WUT_CHECK_OFFSET(FSARequestAppendFile, 0x4, count);
205WUT_CHECK_OFFSET(FSARequestAppendFile, 0x8, handle);
206WUT_CHECK_OFFSET(FSARequestAppendFile, 0xC, unk0x0C);
207WUT_CHECK_SIZE(FSARequestAppendFile, 0x10);
208
213{
215};
216WUT_CHECK_OFFSET(FSARequestChangeDir, 0x0, path);
217WUT_CHECK_SIZE(FSARequestChangeDir, 0x280);
218
219
224{
226 uint32_t mode1;
227 uint32_t mode2;
228};
229WUT_CHECK_OFFSET(FSARequestChangeMode, 0x0, path);
230WUT_CHECK_OFFSET(FSARequestChangeMode, 0x280, mode1);
231WUT_CHECK_OFFSET(FSARequestChangeMode, 0x284, mode2);
232WUT_CHECK_SIZE(FSARequestChangeMode, 0x288);
233
234
242WUT_CHECK_OFFSET(FSARequestCloseDir, 0x0, handle);
243WUT_CHECK_SIZE(FSARequestCloseDir, 0x4);
244
245
253WUT_CHECK_OFFSET(FSARequestCloseFile, 0x0, handle);
254WUT_CHECK_SIZE(FSARequestCloseFile, 0x4);
255
256
264WUT_CHECK_OFFSET(FSARequestFlushFile, 0x0, handle);
265WUT_CHECK_SIZE(FSARequestFlushFile, 0x4);
266
267
272{
274};
275WUT_CHECK_OFFSET(FSARequestFlushQuota, 0x0, path);
276WUT_CHECK_SIZE(FSARequestFlushQuota, 0x280);
277
278
287WUT_CHECK_OFFSET(FSARequestGetInfoByQuery, 0x0, path);
288WUT_CHECK_OFFSET(FSARequestGetInfoByQuery, 0x280, type);
289WUT_CHECK_SIZE(FSARequestGetInfoByQuery, 0x284);
290
291
299WUT_CHECK_OFFSET(FSARequestGetPosFile, 0x0, handle);
300WUT_CHECK_SIZE(FSARequestGetPosFile, 0x4);
301
302
310WUT_CHECK_OFFSET(FSARequestIsEof, 0x0, handle);
311WUT_CHECK_SIZE(FSARequestIsEof, 0x4);
312
313
318{
320 uint32_t permission;
321};
322WUT_CHECK_OFFSET(FSARequestMakeDir, 0x0, path);
323WUT_CHECK_OFFSET(FSARequestMakeDir, 0x280, permission);
324WUT_CHECK_SIZE(FSARequestMakeDir, 0x284);
325
329struct WUT_PACKED FSARequestMakeQuota
330{
331 char path[FS_MAX_PATH +1];
332 uint32_t mode;
333 uint64_t size;
334};
335WUT_CHECK_OFFSET(FSARequestMakeQuota, 0x0, path);
336WUT_CHECK_OFFSET(FSARequestMakeQuota, 0x280, mode);
337WUT_CHECK_OFFSET(FSARequestMakeQuota, 0x284, size);
338WUT_CHECK_SIZE(FSARequestMakeQuota, 0x28C);
339
340
345{
348 uint32_t unk0x500;
349 void* unkBuf;
350 uint32_t unkBufLen;
351};
352WUT_CHECK_OFFSET(FSARequestMount, 0x0, path);
353WUT_CHECK_OFFSET(FSARequestMount, 0x280, target);
354WUT_CHECK_OFFSET(FSARequestMount, 0x500, unk0x500);
355WUT_CHECK_OFFSET(FSARequestMount, 0x504, unkBuf);
356WUT_CHECK_OFFSET(FSARequestMount, 0x508, unkBufLen);
357WUT_CHECK_SIZE(FSARequestMount, 0x50C);
358
359
372WUT_CHECK_OFFSET(FSARequestMountWithProcess, 0x0, path);
373WUT_CHECK_OFFSET(FSARequestMountWithProcess, 0x280, target);
374WUT_CHECK_OFFSET(FSARequestMountWithProcess, 0x500, priority);
375WUT_CHECK_OFFSET(FSARequestMountWithProcess, 0x504, process);
376WUT_CHECK_OFFSET(FSARequestMountWithProcess, 0x514, unkBuf);
377WUT_CHECK_OFFSET(FSARequestMountWithProcess, 0x518, unkBufLen);
378WUT_CHECK_SIZE(FSARequestMountWithProcess, 0x51C);
379
380
385{
387};
388WUT_CHECK_OFFSET(FSARequestOpenDir, 0x0, path);
389WUT_CHECK_SIZE(FSARequestOpenDir, 0x280);
390
395{
398 uint32_t unk0x290;
399 uint32_t unk0x294;
400 uint32_t unk0x298;
401};
402WUT_CHECK_OFFSET(FSARequestOpenFile, 0x0, path);
403WUT_CHECK_OFFSET(FSARequestOpenFile, 0x280, mode);
404WUT_CHECK_OFFSET(FSARequestOpenFile, 0x290, unk0x290);
405WUT_CHECK_OFFSET(FSARequestOpenFile, 0x294, unk0x294);
406WUT_CHECK_OFFSET(FSARequestOpenFile, 0x298, unk0x298);
407WUT_CHECK_SIZE(FSARequestOpenFile, 0x29C);
408
409
417WUT_CHECK_OFFSET(FSARequestReadDir, 0x0, handle);
418WUT_CHECK_SIZE(FSARequestReadDir, 0x4);
419
420
434WUT_CHECK_OFFSET(FSARequestReadFile, 0x00, buffer);
435WUT_CHECK_OFFSET(FSARequestReadFile, 0x04, size);
436WUT_CHECK_OFFSET(FSARequestReadFile, 0x08, count);
437WUT_CHECK_OFFSET(FSARequestReadFile, 0x0C, pos);
438WUT_CHECK_OFFSET(FSARequestReadFile, 0x10, handle);
439WUT_CHECK_OFFSET(FSARequestReadFile, 0x14, readFlags);
440WUT_CHECK_SIZE(FSARequestReadFile, 0x18);
441
442
447{
449};
450WUT_CHECK_OFFSET(FSARequestRemove, 0x0, path);
451WUT_CHECK_SIZE(FSARequestRemove, 0x280);
452
453
458{
461};
462WUT_CHECK_OFFSET(FSARequestRename, 0x0, oldPath);
463WUT_CHECK_OFFSET(FSARequestRename, 0x280, newPath);
464WUT_CHECK_SIZE(FSARequestRename, 0x500);
465
466
474WUT_CHECK_OFFSET(FSARequestRewindDir, 0x0, handle);
475WUT_CHECK_SIZE(FSARequestRewindDir, 0x4);
476
477
486WUT_CHECK_OFFSET(FSARequestSetPosFile, 0x0, handle);
487WUT_CHECK_OFFSET(FSARequestSetPosFile, 0x4, pos);
488WUT_CHECK_SIZE(FSARequestSetPosFile, 0x8);
489
490
498WUT_CHECK_OFFSET(FSARequestStatFile, 0x0, handle);
499WUT_CHECK_SIZE(FSARequestStatFile, 0x4);
500
501
509WUT_CHECK_OFFSET(FSARequestTruncateFile, 0x0, handle);
510WUT_CHECK_SIZE(FSARequestTruncateFile, 0x4);
511
512
517{
519 uint32_t unk0x280;
520};
521WUT_CHECK_OFFSET(FSARequestUnmount, 0x0, path);
522WUT_CHECK_OFFSET(FSARequestUnmount, 0x280, unk0x280);
523WUT_CHECK_SIZE(FSARequestUnmount, 0x284);
524
525
535WUT_CHECK_OFFSET(FSARequestUnmountWithProcess, 0x0, path);
536WUT_CHECK_OFFSET(FSARequestUnmountWithProcess, 0x280, priority);
537WUT_CHECK_OFFSET(FSARequestUnmountWithProcess, 0x284, process);
538WUT_CHECK_SIZE(FSARequestUnmountWithProcess, 0x294);
539
540
554WUT_CHECK_OFFSET(FSARequestWriteFile, 0x00, buffer);
555WUT_CHECK_OFFSET(FSARequestWriteFile, 0x04, size);
556WUT_CHECK_OFFSET(FSARequestWriteFile, 0x08, count);
557WUT_CHECK_OFFSET(FSARequestWriteFile, 0x0C, pos);
558WUT_CHECK_OFFSET(FSARequestWriteFile, 0x10, handle);
559WUT_CHECK_OFFSET(FSARequestWriteFile, 0x14, writeFlags);
560WUT_CHECK_SIZE(FSARequestWriteFile, 0x18);
561
563{
565 WUT_UNKNOWN_BYTES(4);
566 uint32_t owner;
567 WUT_UNKNOWN_BYTES(4);
568 uint32_t group;
569};
570WUT_CHECK_OFFSET(FSARequestChangeOwner, 0x0, path);
571WUT_CHECK_OFFSET(FSARequestChangeOwner, 0x284, owner);
572WUT_CHECK_OFFSET(FSARequestChangeOwner, 0x28C, group);
573WUT_CHECK_SIZE(FSARequestChangeOwner, 0x290);
574
577
578 union {
579 FSARequestRawOpen rawOpen;
580 FSARequestRawClose rawClose;
581 FSARequestRawRead rawRead;
582 FSARequestRawWrite rawWrite;
583 FSARequestAppendFile appendFile;
584 FSARequestChangeDir changeDir;
585 FSARequestChangeMode changeMode;
586 FSARequestCloseDir closeDir;
587 FSARequestCloseFile closeFile;
588 FSARequestFlushFile flushFile;
589 FSARequestFlushQuota flushQuota;
590 FSARequestGetInfoByQuery getInfoByQuery;
591 FSARequestGetPosFile getPosFile;
592 FSARequestIsEof isEof;
593 FSARequestMakeDir makeDir;
594 FSARequestMakeQuota makeQuota;
595 FSARequestMount mount;
596 FSARequestMountWithProcess mountWithProcess;
597 FSARequestOpenDir openDir;
598 FSARequestOpenFile openFile;
599 FSARequestReadDir readDir;
600 FSARequestReadFile readFile;
601 FSARequestRemove remove;
602 FSARequestRename rename;
603 FSARequestRewindDir rewindDir;
604 FSARequestSetPosFile setPosFile;
605 FSARequestStatFile statFile;
606 FSARequestTruncateFile truncateFile;
607 FSARequestUnmount unmount;
608 FSARequestUnmountWithProcess unmountWithProcess;
609 FSARequestWriteFile writeFile;
610 FSARequestChangeOwner changeOwner;
611 WUT_UNKNOWN_BYTES(0x51C);
612 };
613};
614WUT_CHECK_OFFSET(FSARequest, 0x00, emulatedError);
615WUT_CHECK_OFFSET(FSARequest, 0x04, rawOpen);
616WUT_CHECK_SIZE(FSARequest, 0x520);
617
618
621};
622WUT_CHECK_OFFSET(FSAResponseRawOpen, 0x0, handle);
623WUT_CHECK_SIZE(FSAResponseRawOpen, 0x4);
624
626{
628};
629WUT_CHECK_OFFSET(FSAResponseGetCwd, 0x0, path);
630WUT_CHECK_SIZE(FSAResponseGetCwd, 0x280);
631
633{
634 uint32_t address;
635};
636WUT_CHECK_OFFSET(FSAResponseGetFileBlockAddress, 0x0, address);
637WUT_CHECK_SIZE(FSAResponseGetFileBlockAddress, 0x4);
638
643WUT_CHECK_OFFSET(FSAResponseGetPosFile, 0x0, pos);
644WUT_CHECK_SIZE(FSAResponseGetPosFile, 0x4);
645
650WUT_CHECK_OFFSET(FSAResponseGetVolumeInfo, 0x0, volumeInfo);
651WUT_CHECK_SIZE(FSAResponseGetVolumeInfo, 0x1BC);
652
654{
655 union WUT_PACKED {
656 FSABlockInfo badBlockInfo;
657 FSADeviceInfo deviceInfo;
658 uint64_t dirSize;
659 FSAEntryNum entryNum;
660 FSAFileSystemInfo fileSystemInfo;
661 FSABlockInfo fragmentBlockInfo;
662 uint64_t freeSpaceSize;
663 uint64_t journalFreeSpaceSize;
664 FSAStat stat;
665 };
666};
667WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, badBlockInfo);
668WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, deviceInfo);
669WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, dirSize);
670WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, entryNum);
671WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, fragmentBlockInfo);
672WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, freeSpaceSize);
673WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, fileSystemInfo);
674WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, journalFreeSpaceSize);
675WUT_CHECK_OFFSET(FSAResponseGetInfoByQuery, 0x0, stat);
676WUT_CHECK_SIZE(FSAResponseGetInfoByQuery, 0x64);
677
682WUT_CHECK_OFFSET(FSAResponseOpenFile, 0x0, handle);
683WUT_CHECK_SIZE(FSAResponseOpenFile, 0x4);
684
689WUT_CHECK_OFFSET(FSAResponseOpenDir, 0x0, handle);
690WUT_CHECK_SIZE(FSAResponseOpenDir, 0x4);
691
696WUT_CHECK_OFFSET(FSAResponseReadDir, 0x0, entry);
697WUT_CHECK_SIZE(FSAResponseReadDir, 0x164);
698
703WUT_CHECK_OFFSET(FSAResponseStatFile, 0x0, stat);
704WUT_CHECK_SIZE(FSAResponseStatFile, 0x64);
705
706struct WUT_PACKED FSAResponse {
707 uint32_t word0;
708 union WUT_PACKED {
709 FSAResponseRawOpen rawOpen;
710 FSAResponseGetCwd getCwd;
711 FSAResponseGetFileBlockAddress getFileBlockAddress;
712 FSAResponseGetPosFile getPosFile;
713 FSAResponseGetVolumeInfo getVolumeInfo;
714 FSAResponseGetInfoByQuery getInfoByQuery;
715 FSAResponseOpenDir openDir;
716 FSAResponseOpenFile openFile;
717 FSAResponseReadDir readDir;
718 FSAResponseStatFile statFile;
719 WUT_UNKNOWN_BYTES(0x28F);
720 };
721};
722WUT_CHECK_OFFSET(FSAResponse, 0x0, word0);
723WUT_CHECK_OFFSET(FSAResponse, 0x4, rawOpen);
724WUT_CHECK_SIZE(FSAResponse, 0x293);
725
792};
793
798
824WUT_CHECK_OFFSET(FSAAsyncResult, 0x00, ioMsgQueue);
825WUT_CHECK_OFFSET(FSAAsyncResult, 0x04, msg);
826WUT_CHECK_OFFSET(FSAAsyncResult, 0x14, userCallback);
827WUT_CHECK_OFFSET(FSAAsyncResult, 0x18, error);
828WUT_CHECK_OFFSET(FSAAsyncResult, 0x1C, command);
829WUT_CHECK_OFFSET(FSAAsyncResult, 0x20, request);
830WUT_CHECK_OFFSET(FSAAsyncResult, 0x24, response);
831WUT_CHECK_OFFSET(FSAAsyncResult, 0x28, userContext);
832WUT_CHECK_SIZE(FSAAsyncResult, 0x2C);
833
834struct WUT_PACKED FSAShimBuffer {
837 WUT_UNKNOWN_BYTES(0x60);
838
841 WUT_UNKNOWN_BYTES(0x880 - 0x813);
842
844 IOSVec ioctlvVec[3];
845
846 WUT_UNKNOWN_BYTES(0x900 - 0x8A4);
847
850
852 uint32_t clientHandle;
853
856
858 uint8_t ioctlvVecIn;
859
862
865};
866WUT_CHECK_OFFSET(FSAShimBuffer, 0x0, request);
867WUT_CHECK_OFFSET(FSAShimBuffer, 0x580, response);
868WUT_CHECK_OFFSET(FSAShimBuffer, 0x880, ioctlvVec);
869WUT_CHECK_OFFSET(FSAShimBuffer, 0x900, command);
870WUT_CHECK_OFFSET(FSAShimBuffer, 0x904, clientHandle);
871WUT_CHECK_OFFSET(FSAShimBuffer, 0x908, ipcReqType);
872WUT_CHECK_OFFSET(FSAShimBuffer, 0x90A, ioctlvVecIn);
873WUT_CHECK_OFFSET(FSAShimBuffer, 0x90B, ioctlvVecOut);
874WUT_CHECK_OFFSET(FSAShimBuffer, 0x90C, fsaAsyncResult);
875WUT_CHECK_SIZE(FSAShimBuffer, 0x938);
876
878 FSACommand command,
879 FSARequest *request,
880 FSAResponse *response,
881 void *userContext);
882
893WUT_CHECK_OFFSET(FSAClientAttachAsyncData, 0x00, userCallback);
894WUT_CHECK_OFFSET(FSAClientAttachAsyncData, 0x04, userContext);
895WUT_CHECK_OFFSET(FSAClientAttachAsyncData, 0x08, ioMsgQueue);
896WUT_CHECK_SIZE(FSAClientAttachAsyncData, 0xC);
897
903
909
912
913void
915
916uint32_t
918
921
924
925const char *
927
930 IOSError err);
931
934 const char *path);
935
938 const char *path);
939
942 const char *path);
943
948void
950
953
956 const char *source,
957 const char *target,
958 FSAMountFlags flags,
959 void *arg_buf,
960 uint32_t arg_len);
961
964 const char *mountedTarget,
965 FSAUnmountFlags flags);
966
969 const char *path);
970
973 const char *path,
974 FSMode permission);
975
978 const char *path,
979 const char *mode,
980 FSMode createMode,
981 FSOpenFileFlags openFlag,
982 uint32_t preallocSize,
983 FSAFileHandle *outFileHandle);
984
987 FSAStat *stat,
988 const char *mode,
989 const char *path,
990 FSAFileHandle *outFileHandle);
991
994 FSAFileHandle fileHandle,
995 FSAStat *stat);
996
999 const char *path,
1000 FSAStat *stat);
1001
1002FSError
1004 FSAFileHandle fileHandle);
1005
1006FSError
1008 FSAFileHandle fileHandle,
1009 uint32_t size,
1010 uint32_t count);
1011
1012FSError
1014 FSAFileHandle fileHandle,
1015 uint32_t size,
1016 uint32_t count,
1017 uint32_t flags);
1018
1019FSError
1021 FSAFileHandle fileHandle,
1022 uint32_t *outPos);
1023
1024FSError
1026 FSAFileHandle fileHandle);
1027
1028FSError
1030 FSAFileHandle fileHandle,
1031 uint32_t pos);
1032
1033FSError
1035 FSAFileHandle handle);
1036
1037FSError
1039 void *buffer,
1040 uint32_t size,
1041 uint32_t count,
1042 FSAFileHandle handle,
1043 uint32_t flags);
1044
1045FSError
1047 void *buffer,
1048 uint32_t size,
1049 uint32_t count,
1050 uint32_t pos,
1051 FSAFileHandle handle,
1052 uint32_t flags);
1053
1054FSError
1056 FSAFileHandle fileHandle);
1057
1058FSError
1060 void *buffer,
1061 uint32_t size,
1062 uint32_t count,
1063 FSAFileHandle handle,
1064 uint32_t flags);
1065
1066FSError
1068 void *buffer,
1069 uint32_t size,
1070 uint32_t count,
1071 uint32_t pos,
1072 FSAFileHandle handle,
1073 uint32_t flags);
1074
1075FSError
1077 const char *path);
1078
1079FSError
1081 const char *oldPath,
1082 const char *newPath);
1083
1084FSError
1086 const char *path,
1087 FSADirectoryHandle *dirHandle);
1088
1089FSError
1091 FSADirectoryHandle dirHandle,
1092 FSADirectoryEntry *directoryEntry);
1093
1094FSError
1096 FSADirectoryHandle dirHandle);
1097
1098FSError
1100 FSADirectoryHandle dirHandle);
1101
1102FSError
1104 const char *path,
1105 FSMode mode);
1106
1107FSError
1109 char *outPath,
1110 uint32_t outPathLen);
1111
1112FSError
1114 uint32_t *poolSize,
1115 uint32_t *numMessages);
1116
1117FSError
1119 const char *path,
1120 FSAVolumeInfo *outVolumeInfo);
1121
1122
1123FSError
1125 const char *name,
1126 uint32_t mode,
1127 uint64_t quota);
1128
1129FSError
1131 const char *path);
1132
1133FSError
1135 const char *path);
1136
1137FSError
1139 const char *path);
1140
1141FSError
1143 const char *path);
1144
1145FSError
1147 const char *path,
1148 uint64_t *freeSpaceSize);
1149
1150FSError
1152 const char *path,
1153 uint64_t *journalFreeSpaceSize);
1154
1155FSError
1157 const char *path,
1158 uint64_t *freeDirSize);
1159
1160FSError
1162 const char *path,
1163 FSAEntryNum *entryNum);
1164
1165FSError
1167 const char *path,
1168 FSAFileSystemInfo *fileSystemInfo);
1169
1170FSError
1172 const char *path,
1173 FSADeviceInfo *fileSystemInfo);
1174
1175FSError
1177 const char *path,
1178 FSABlockInfo *blockInfo);
1179
1180FSError
1182 const char *path,
1183 FSABlockInfo *blockInfo);
1184
1185#ifdef __cplusplus
1186}
1187#endif
FSError FSAAppendFileEx(FSAClientHandle client, FSAFileHandle fileHandle, uint32_t size, uint32_t count, uint32_t flags)
uint8_t ioctlvVecOut
Number of ioctlv output vectors.
FSError FSAOpenFileEx(FSAClientHandle client, const char *path, const char *mode, FSMode createMode, FSOpenFileFlags openFlag, uint32_t preallocSize, FSAFileHandle *outFileHandle)
FSAMountFlags
@ FSA_MOUNT_FLAG_LOCAL_MOUNT
@ FSA_MOUNT_FLAG_BIND_MOUNT
@ FSA_MOUNT_FLAG_GLOBAL_MOUNT
FSAAsyncResult fsaAsyncResult
FSAAsyncResult used for FSA* functions.
FSError FSACloseFile(FSAClientHandle client, FSAFileHandle fileHandle)
FSError FSADelClient(FSAClientHandle client)
FSError FSAOpenDir(FSAClientHandle client, const char *path, FSADirectoryHandle *dirHandle)
FSError FSARegisterFlushQuota(FSAClientHandle client, const char *path)
FSError FSAGetDeviceInfo(FSAClientHandle client, const char *path, FSADeviceInfo *fileSystemInfo)
FSError FSARollbackVolume(FSAClientHandle client, const char *path)
uint32_t FSAGetClientNum()
FSError FSAGetEntryNum(FSAClientHandle client, const char *path, FSAEntryNum *entryNum)
FSError FSAFlushVolume(FSAClientHandle client, const char *path)
uint32_t FSACommand
void FSAShutdown()
FSError FSAInit()
FSError FSAGetDirSize(FSAClientHandle client, const char *path, uint64_t *freeDirSize)
FSError FSARewindDir(FSAClientHandle client, FSADirectoryHandle dirHandle)
uint32_t clientHandle
Handle to FSA device.
OSMessageQueue * ioMsgQueue
Queue to put a message on when command is complete.
FSError FSASetPosFile(FSAClientHandle client, FSAFileHandle fileHandle, uint32_t pos)
FSError FSAGetVolumeInfo(FSAClientHandle client, const char *path, FSAVolumeInfo *outVolumeInfo)
FSError FSAUnmount(FSAClientHandle client, const char *mountedTarget, FSAUnmountFlags flags)
FSAReadFlag
@ FSA_READ_FLAG_NONE
@ FSA_READ_FLAG_READ_WITH_POS
FSError FSAIsEof(FSAClientHandle client, FSAFileHandle fileHandle)
uint32_t FSAEntryNum
FSError FSAGetFreeSpaceSize(FSAClientHandle client, const char *path, uint64_t *freeSpaceSize)
FSError FSAOpenFileByStat(FSAClientHandle client, FSAStat *stat, const char *mode, const char *path, FSAFileHandle *outFileHandle)
FSError FSAGetFileSystemInfo(FSAClientHandle client, const char *path, FSAFileSystemInfo *fileSystemInfo)
void FSAFreeAsyncResult(FSAAsyncResult *asyncResult)
Frees the FSAShimBuffer where the given asyncResult is part of.
uint8_t * buffer
Virtual pointer used only by Cafe, for IOS we should use ioctlv.vecs[1].
const char * FSAGetStatusStr(FSError error)
FSError FSARemove(FSAClientHandle client, const char *path)
FSError FSAWriteFileWithPos(FSAClientHandle client, void *buffer, uint32_t size, uint32_t count, uint32_t pos, FSAFileHandle handle, uint32_t flags)
FSError emulatedError
FSError FSAChangeDir(FSAClientHandle client, const char *path)
IOSHandle FSAClientHandle
FSError FSAFlushFile(FSAClientHandle client, FSAFileHandle fileHandle)
FSAAsyncCallbackFn userCallback
Callback to call when the command is complete.
FSError FSAGetStatFile(FSAClientHandle client, FSAFileHandle fileHandle, FSAStat *stat)
FSError FSARename(FSAClientHandle client, const char *oldPath, const char *newPath)
FSError FSAGetTransactionBlockPoolAttributes(uint32_t *messageSize, uint32_t *poolSize, uint32_t *numMessages)
FSAIpcRequestTypeEnum
@ FSA_IPC_REQUEST_IOCTL
@ FSA_IPC_REQUEST_IOCTLV
FSError FSAGetJournalFreeSpaceSize(FSAClientHandle client, const char *path, uint64_t *journalFreeSpaceSize)
FSError FSAFlushQuota(FSAClientHandle client, const char *path)
uint8_t ioctlvVecIn
Number of ioctlv input vectors.
char target[FS_MAX_PATH+1]
FSError FSAFlushMultiQuota(FSAClientHandle client, const char *path)
FSDirectoryEntry FSADirectoryEntry
FSError FSAChangeMode(FSAClientHandle client, const char *path, FSMode permission)
FSARequest request
Buffer for FSA IPC request.
char mode[FS_MODE_LENGTH]
void(* FSAAsyncCallbackFn)(FSError result, FSACommand command, FSARequest *request, FSAResponse *response, void *userContext)
FSError FSAReadFile(FSAClientHandle client, void *buffer, uint32_t size, uint32_t count, FSAFileHandle handle, uint32_t flags)
uint32_t FSADirectoryHandle
FSADirectoryEntry entry
uint16_t FSAIpcRequestType
FSError FSAWriteFile(FSAClientHandle client, void *buffer, uint32_t size, uint32_t count, FSAFileHandle handle, uint32_t flags)
FSAUnmountFlags
@ FSA_UNMOUNT_FLAG_NONE
@ FSA_UNMOUNT_FLAG_BIND_MOUNT
@ FSA_UNMOUNT_FLAG_FORCE
FSError FSAReadDir(FSAClientHandle client, FSADirectoryHandle dirHandle, FSADirectoryEntry *directoryEntry)
FSADirectoryHandle handle
FSError FSAMakeDir(FSAClientHandle client, const char *path, FSMode mode)
FSError FSAMount(FSAClientHandle client, const char *source, const char *target, FSAMountFlags flags, void *arg_buf, uint32_t arg_len)
FSError FSAGetBadBlockInfo(FSAClientHandle client, const char *path, FSABlockInfo *blockInfo)
FSAWriteFlag writeFlags
FSAMountPriority
@ FSA_MOUNT_PRIORITY_RAM_DISK_CACHE
@ FSA_MOUNT_PRIORITY_TITLE_UPDATE
@ FSA_MOUNT_PRIORITY_UNMOUNT_ALL
@ FSA_MOUNT_PRIORITY_BASE
char oldPath[FS_MAX_PATH+1]
FSAAsyncResult FSAGetAsyncResult(OSMessage *asyncResult)
FSError FSAReadFileWithPos(FSAClientHandle client, void *buffer, uint32_t size, uint32_t count, uint32_t pos, FSAFileHandle handle, uint32_t flags)
FSStat FSAStat
FSError FSAGetPosFile(FSAClientHandle client, FSAFileHandle fileHandle, uint32_t *outPos)
FSAClientHandle FSAAddClient(FSAClientAttachAsyncData *attachAsyncData)
FSError FSAAppendFile(FSAClientHandle client, FSAFileHandle fileHandle, uint32_t size, uint32_t count)
FSARequest * request
Pointer to allocated FSA IPC Request.
uint32_t deviceSectorSize
FSError FSAMakeQuota(FSAClientHandle client, const char *name, uint32_t mode, uint64_t quota)
FSError FSACloseDir(FSAClientHandle client, FSADirectoryHandle dirHandle)
FSError FSAGetStat(FSAClientHandle client, const char *path, FSAStat *stat)
FSMessage msg
Message used for ioMsgQueue.
FSAIpcRequestType ipcReqType
IOS IPC request type to use.
FSError __FSAShimDecodeIosErrorToFsaStatus(IOSHandle handle, IOSError err)
void(* FSAClientAttachAsyncCallbackFn)(FSError result, FSACommand command, FSARequest *request, FSAResponse *response, void *userContext)
FSAQueryInfoType
@ FSA_QUERY_INFO_BAD_BLOCK_INFO
@ FSA_QUERY_INFO_ENTRY_NUM
@ FSA_QUERY_INFO_FREE_SPACE_SIZE
@ FSA_QUERY_INFO_DEVICE_INFO
@ FSA_QUERY_INFO_FRAGMENT_BLOCK_INFO
@ FSA_QUERY_INFO_DIR_SIZE
@ FSA_QUERY_INFO_JOURNAL_FREE_SPACE_SIZE
@ FSA_QUERY_INFO_STAT
@ FSA_QUERY_INFO_FILE_SYSTEM_INFO
FSError error
Result.
uint64_t deviceSizeInSectors
FSAWriteFlag
@ FSA_WRITE_FLAG_NONE
@ FSA_WRITE_FLAG_READ_WITH_POS
FSAResponse * response
Pointer to allocated FSA IPC Response.
FSAResponse response
Buffer for FSA IPC response.
FSError FSAGetCwd(FSAClientHandle client, char *outPath, uint32_t outPathLen)
FSAClientAttachAsyncCallbackFn userCallback
Callback to call when an attach has happened.
FSError FSATruncateFile(FSAClientHandle client, FSAFileHandle handle)
void * userContext
Callback to call when the command is complete.
FSError FSAGetFragmentBlockInfo(FSAClientHandle client, const char *path, FSABlockInfo *blockInfo)
FSACommandEnum
@ FSA_COMMAND_RAW_CLOSE
@ FSA_COMMAND_CHANGE_OWNER
@ FSA_COMMAND_GET_PROC_RESOURCE_USAGE
@ FSA_COMMAND_OPEN_FILE
@ FSA_COMMAND_FORMAT
@ FSA_COMMAND_FLUSH_FILE
@ FSA_COMMAND_GET_VOLUME_INFO
@ FSA_COMMAND_MAKE_LINK
@ FSA_COMMAND_UNMOUNT_WITH_PROCESS
@ FSA_COMMAND_CLOSE_DIR
@ FSA_COMMAND_SEND_PROFILE_CMD
@ FSA_COMMAND_RENAME
@ FSA_COMMAND_CHANGE_DIR
@ FSA_COMMAND_MOUNT
@ FSA_COMMAND_SET_CLIENT_PRIORITY
@ FSA_COMMAND_ADD_USER_PROCESS
@ FSA_COMMAND_STAT_FILE
@ FSA_COMMAND_READ_FILE
@ FSA_COMMAND_RAW_OPEN
@ FSA_COMMAND_DEBUG_SET_TITLE_ID
@ FSA_COMMAND_RAW_WRITE
@ FSA_COMMAND_REMOVE_QUOTA
@ FSA_COMMAND_DEL_USER_PROCESS
@ FSA_COMMAND_ROLLBACK_VOLUME
@ FSA_COMMAND_REWIND_DIR
@ FSA_COMMAND_GET_ALL_RESOURCE_USAGE
@ FSA_COMMAND_GET_ATTACH
@ FSA_COMMAND_GET_ERROR
@ FSA_COMMAND_GET_INFO_BY_QUERY
@ FSA_COMMAND_DEBUG_SET_CAPABILITY
@ FSA_COMMAND_CANCEL_GET_ATTACH
@ FSA_COMMAND_GET_FILE_BLOCK_ADDRESS
@ FSA_COMMAND_REGISTER_FLUSH_QUOTA
@ FSA_COMMAND_IS_EOF
@ FSA_COMMAND_SET_POS_FILE
@ FSA_COMMAND_XFER_PARAMS
@ FSA_COMMAND_UNMOUNT
@ FSA_COMMAND_OPEN_DIR
@ FSA_COMMAND_MAKE_QUOTA
@ FSA_COMMAND_TRUNCATE_FILE
@ FSA_COMMAND_WRITE_FILE
@ FSA_COMMAND_GET_VOLUME_EXISTENCE
@ FSA_COMMAND_CONFIG_UNSET_MEMORY_CACHE
@ FSA_COMMAND_EXEC_DEBUG_PROC
@ FSA_COMMAND_REMOVE
@ FSA_COMMAND_GET_CWD
@ FSA_COMMAND_APPEND_FILE
@ FSA_COMMAND_CONFIG_SET_MEMORY_CACHE
@ FSA_COMMAND_RAW_READ
@ FSA_COMMAND_READ_DIR
@ FSA_COMMAND_CHANGE_MODE
@ FSA_COMMAND_MOUNT_WITH_PROCESS
@ FSA_COMMAND_ROLLBACK_QUOTA
@ FSA_COMMAND_CLOSE_FILE
@ FSA_COMMAND_GET_POS_FILE
@ FSA_COMMAND_OPEN_FILE_BY_STAT
@ FSA_COMMAND_INVALID
@ FSA_COMMAND_FLUSH_MULTI_QUOTA
@ FSA_COMMAND_APPLY_MEMORY_CACHE
@ FSA_COMMAND_CONFIG_SET_PRF2_CHAR_CODE
@ FSA_COMMAND_GET_LAST_FAILED_VOLUME
@ FSA_COMMAND_FLUSH_VOLUME
@ FSA_COMMAND_MAKE_DIR
@ FSA_COMMAND_FLUSH_QUOTA
@ FSA_COMMAND_SET_PROCESS_CONFIG
char path[FS_MAX_PATH+1]
FSAFilePosition pos
char newPath[FS_MAX_PATH+1]
FSError FSARollbackQuotaForce(FSAClientHandle client, const char *path)
uint32_t FSAFilePosition
const uint8_t * buffer
Virtual pointer used only by Cafe, for IOS we should use ioctlv.vecs[1].
FSACommand command
FSA command.
uint32_t FSAFileHandle
FSError FSARollbackQuota(FSAClientHandle client, const char *path)
Block information.
Device information.
File System information.
Process information.
Request data for Command::AppendFile.
Request data for Command::ChangeDir.
Request data for Command::ChangeMode.
Request data for Command::CloseDir.
Request data for Command::CloseFile.
Request data for Command::FlushFile.
Request data for Command::FlushQuota.
Request data for Command::GetInfoByQuery.
Request data for Command::GetPosFile.
Request data for Command::IsEof.
Request data for Command::MakeDir.
Request data for Command::MakeQuota.
Request data for Command::Mount.
Request data for Command::MountWithProcess.
Request data for Command::OpenDir.
Request data for Command::OpenFile.
Request data for Command::ReadDir.
Request data for Command::ReadFile.
Request data for Command::Remove.
Request data for Command::Rename.
Request data for Command::RewindDir.
Request data for Command::SetPosFile.
Request data for Command::StatFile.
Request data for Command::TruncateFile.
Request data for Command::Unmount.
Request data for Command::UnmountWithProcess.
Request data for Command::WriteFile.
FSOpenFileFlags
Definition filesystem.h:198
#define FS_MAX_PATH
Definition filesystem.h:28
FSMode
Definition filesystem.h:137
#define FS_MODE_LENGTH
Definition filesystem.h:29
FSError
Definition filesystem.h:95
IOSError
Definition ios.h:25
int32_t IOSHandle
Definition ios.h:15
Definition ios.h:72