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

Function romfsMountFromCurrentProcess

libctru/source/romfs_dev.c:296–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296Result romfsMountFromCurrentProcess(const char *name)
297{
298 // Set up FS_Path structures
299 u8 zeros[0xC] = {0};
300 FS_Path archPath = { PATH_EMPTY, 1, "" };
301 FS_Path filePath = { PATH_BINARY, sizeof(zeros), zeros };
302
303 // Open the RomFS file and mount it
304 Handle fd = 0;
305 Result rc = FSUSER_OpenFileDirectly(&fd, ARCHIVE_ROMFS, archPath, filePath, FS_OPEN_READ, 0);
306 if (R_SUCCEEDED(rc))
307 rc = romfsMountFromFile(fd, 0, name);
308
309 return rc;
310}
311
312Result romfsMountFromTitle(u64 tid, FS_MediaType mediatype, const char* name)
313{

Callers 1

romfsMountSelfFunction · 0.85

Calls 2

FSUSER_OpenFileDirectlyFunction · 0.85
romfsMountFromFileFunction · 0.85

Tested by

no test coverage detected