MCPcopy Create free account
hub / github.com/devkitPro/libctru / romfsMountFromTitle

Function romfsMountFromTitle

libctru/source/romfs_dev.c:312–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312Result 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
329Result romfsUnmount(const char* name)
330{

Callers 1

osReadVersionBinFunction · 0.85

Calls 2

FSUSER_OpenFileDirectlyFunction · 0.85
romfsMountFromFileFunction · 0.85

Tested by

no test coverage detected