| 161 | } |
| 162 | |
| 163 | Result FSUSER_OpenFile(Handle* out, FS_Archive archive, FS_Path path, u32 openFlags, u32 attributes) |
| 164 | { |
| 165 | u32 *cmdbuf = getThreadCommandBuffer(); |
| 166 | |
| 167 | cmdbuf[0] = IPC_MakeHeader(0x802,7,2); // 0x80201C2 |
| 168 | cmdbuf[1] = 0; |
| 169 | cmdbuf[2] = (u32) archive; |
| 170 | cmdbuf[3] = (u32) (archive >> 32); |
| 171 | cmdbuf[4] = path.type; |
| 172 | cmdbuf[5] = path.size; |
| 173 | cmdbuf[6] = openFlags; |
| 174 | cmdbuf[7] = attributes; |
| 175 | cmdbuf[8] = IPC_Desc_StaticBuffer(path.size, 0); |
| 176 | cmdbuf[9] = (u32) path.data; |
| 177 | |
| 178 | Result ret = 0; |
| 179 | if(R_FAILED(ret = svcSendSyncRequest(fsSessionForArchive(archive)))) return ret; |
| 180 | |
| 181 | if(out) *out = cmdbuf[3]; |
| 182 | |
| 183 | return cmdbuf[1]; |
| 184 | } |
| 185 | |
| 186 | Result FSUSER_OpenFileDirectly(Handle* out, FS_ArchiveID archiveId, FS_Path archivePath, FS_Path filePath, u32 openFlags, u32 attributes) |
| 187 | { |
no test coverage detected