Skip to content
Snippets Groups Projects
Commit fc32d625 authored by Lioncash's avatar Lioncash
Browse files

loader/nro: Make the static LoadNro function internally linked

This simply acts as a forwarding function for the Load() function, so
this doesn't need to be directly exposed.
parent b110d217
No related branches found
No related tags found
No related merge requests found
...@@ -128,8 +128,8 @@ static constexpr u32 PageAlignSize(u32 size) { ...@@ -128,8 +128,8 @@ static constexpr u32 PageAlignSize(u32 size) {
return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK; return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK;
} }
/*static*/ bool AppLoader_NRO::LoadNro(Kernel::Process& process, const std::vector<u8>& data, static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data,
const std::string& name, VAddr load_base) { const std::string& name, VAddr load_base) {
if (data.size() < sizeof(NroHeader)) { if (data.size() < sizeof(NroHeader)) {
return {}; return {};
} }
...@@ -195,8 +195,9 @@ static constexpr u32 PageAlignSize(u32 size) { ...@@ -195,8 +195,9 @@ static constexpr u32 PageAlignSize(u32 size) {
return true; return true;
} }
bool AppLoader_NRO::LoadNro(Kernel::Process& process, const FileSys::VfsFile& file, VAddr load_base) { bool AppLoader_NRO::LoadNro(Kernel::Process& process, const FileSys::VfsFile& file,
return LoadNro(process, file.ReadAllBytes(), file.GetName(), load_base); VAddr load_base) {
return LoadNroImpl(process, file.ReadAllBytes(), file.GetName(), load_base);
} }
ResultStatus AppLoader_NRO::Load(Kernel::Process& process) { ResultStatus AppLoader_NRO::Load(Kernel::Process& process) {
......
...@@ -45,9 +45,6 @@ public: ...@@ -45,9 +45,6 @@ public:
ResultStatus ReadTitle(std::string& title) override; ResultStatus ReadTitle(std::string& title) override;
bool IsRomFSUpdatable() const override; bool IsRomFSUpdatable() const override;
static bool LoadNro(Kernel::Process& process, const std::vector<u8>& data,
const std::string& name, VAddr load_base);
private: private:
bool LoadNro(Kernel::Process& process, const FileSys::VfsFile& file, VAddr load_base); bool LoadNro(Kernel::Process& process, const FileSys::VfsFile& file, VAddr load_base);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment