From 913896cbd99e414c325c9d47a987376ed6d9fffd Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 7 Jul 2018 20:24:51 -0700 Subject: Revert "Virtual Filesystem (#597)" This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2. --- src/core/loader/nso.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/core/loader/nso.h') diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index 3f7567500..386f4d39a 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h @@ -15,22 +15,29 @@ namespace Loader { /// Loads an NSO file class AppLoader_NSO final : public AppLoader, Linker { public: - explicit AppLoader_NSO(FileSys::VirtualFile file); + AppLoader_NSO(FileUtil::IOFile&& file, std::string filepath); /** * Returns the type of the file - * @param file std::shared_ptr open file + * @param file FileUtil::IOFile open file + * @param filepath Path of the file that we are opening. * @return FileType found, or FileType::Error if this loader doesn't know it */ - static FileType IdentifyType(const FileSys::VirtualFile& file); + static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath); FileType GetFileType() override { - return IdentifyType(file); + return IdentifyType(file, filepath); } - static VAddr LoadModule(FileSys::VirtualFile file, VAddr load_base); + static VAddr LoadModule(const std::string& name, const std::vector& file_data, + VAddr load_base); + + static VAddr LoadModule(const std::string& path, VAddr load_base); ResultStatus Load(Kernel::SharedPtr& process) override; + +private: + std::string filepath; }; } // namespace Loader -- cgit v1.2.3