mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-28 15:52:39 +02:00
Added romfsMountFromCurrentProcess().
This commit is contained in:
parent
f6f6adf1cb
commit
90620daf05
@ -84,6 +84,12 @@ static inline Result romfsInitFromStorage(FsStorage storage, u64 offset)
|
|||||||
return romfsMountFromStorage(storage, offset, "romfs");
|
return romfsMountFromStorage(storage, offset, "romfs");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mounts RomFS using the current process host title RomFS.
|
||||||
|
* @param name Device mount name.
|
||||||
|
*/
|
||||||
|
Result romfsMountFromCurrentProcess(const char *name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mounts RomFS from a file path in a mounted fsdev device.
|
* @brief Mounts RomFS from a file path in a mounted fsdev device.
|
||||||
* @param path File path.
|
* @param path File path.
|
||||||
|
@ -317,6 +317,16 @@ Result romfsMountFromStorage(FsStorage storage, u64 offset, const char *name)
|
|||||||
return romfsMountCommon(name, mount);
|
return romfsMountCommon(name, mount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result romfsMountFromCurrentProcess(const char *name) {
|
||||||
|
FsStorage storage;
|
||||||
|
|
||||||
|
Result rc = fsOpenDataStorageByCurrentProcess(&storage);
|
||||||
|
if (R_FAILED(rc))
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
return romfsMountFromStorage(storage, 0, name);
|
||||||
|
}
|
||||||
|
|
||||||
Result romfsMountFromFsdev(const char *path, u64 offset, const char *name)
|
Result romfsMountFromFsdev(const char *path, u64 offset, const char *name)
|
||||||
{
|
{
|
||||||
FsFileSystem *tmpfs = NULL;
|
FsFileSystem *tmpfs = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user