| 310 | } |
| 311 | |
| 312 | Result romfsMountFromTitle(u64 tid, FS_MediaType mediatype, const char* name) |
| 313 | { |
| 314 | // Set up FS_Path structures |
| 315 | u32 archPathData[4] = { (u32)tid, (u32)(tid>>32), (u8)mediatype, 0 }; |
| 316 | u32 filePathData[5] = { 0 }; |
| 317 | FS_Path archPath = { PATH_BINARY, sizeof(archPathData), archPathData }; |
| 318 | FS_Path filePath = { PATH_BINARY, sizeof(filePathData), filePathData }; |
| 319 | |
| 320 | // Open the RomFS file and mount it |
| 321 | Handle fd = 0; |
| 322 | Result rc = FSUSER_OpenFileDirectly(&fd, ARCHIVE_SAVEDATA_AND_CONTENT, archPath, filePath, FS_OPEN_READ, 0); |
| 323 | if (R_SUCCEEDED(rc)) |
| 324 | rc = romfsMountFromFile(fd, 0, name); |
| 325 | |
| 326 | return rc; |
| 327 | } |
| 328 | |
| 329 | Result romfsUnmount(const char* name) |
| 330 | { |
no test coverage detected