Add IVFC parser
This commit is contained in:
21
src/core/fs/romfs.cpp
Normal file
21
src/core/fs/romfs.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "fs/romfs.hpp"
|
||||
#include "fs/ivfc.hpp"
|
||||
#include <cstdio>
|
||||
|
||||
namespace RomFS {
|
||||
|
||||
RomFSNode parseRomFSTree(uintptr_t romFS, u64 romFSSize) {
|
||||
RomFSNode root;
|
||||
|
||||
IVFC::IVFC ivfc;
|
||||
size_t ivfcSize = IVFC::parseIVFC((uintptr_t)romFS, ivfc);
|
||||
|
||||
if (ivfcSize == 0) {
|
||||
printf("Failed to parse IVFC\n");
|
||||
return {};
|
||||
}
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
} // namespace RomFS
|
||||
Reference in New Issue
Block a user