loader: Refactor to also pass filepath into IdentifyType.
This commit is contained in:
parent
2dafd0d287
commit
023aef053c
8 changed files with 19 additions and 19 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "common/common_types.h"
|
||||
#include "common/file_util.h"
|
||||
|
@ -23,12 +22,13 @@ public:
|
|||
/**
|
||||
* Returns the type of the 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(FileUtil::IOFile& file);
|
||||
static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath);
|
||||
|
||||
FileType GetFileType() override {
|
||||
return IdentifyType(file);
|
||||
return IdentifyType(file, filepath);
|
||||
}
|
||||
|
||||
static VAddr LoadModule(const std::string& path, VAddr load_base);
|
||||
|
@ -36,7 +36,6 @@ public:
|
|||
ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
|
||||
|
||||
private:
|
||||
|
||||
std::string filepath;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue