mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 10:45:28 +00:00
Remove references to nn::hac::meta::InstructionType
This commit is contained in:
parent
730b7e5641
commit
84e17b5926
|
@ -43,9 +43,9 @@ void NroProcess::setVerifyMode(bool verify)
|
|||
mVerify = verify;
|
||||
}
|
||||
|
||||
void NroProcess::setInstructionType(nn::hac::meta::InstructionType type)
|
||||
void NroProcess::setIs64BitInstruction(bool flag)
|
||||
{
|
||||
mRoMeta.setInstructionType(type);
|
||||
mRoMeta.setIs64BitInstruction(flag);
|
||||
}
|
||||
|
||||
void NroProcess::setListApi(bool listApi)
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
void setCliOutputMode(CliOutputMode type);
|
||||
void setVerifyMode(bool verify);
|
||||
|
||||
void setInstructionType(nn::hac::meta::InstructionType type);
|
||||
void setIs64BitInstruction(bool flag);
|
||||
void setListApi(bool listApi);
|
||||
void setListSymbols(bool listSymbols);
|
||||
|
||||
|
|
|
@ -9,7 +9,10 @@
|
|||
NsoProcess::NsoProcess():
|
||||
mFile(),
|
||||
mCliOutputMode(_BIT(OUTPUT_BASIC)),
|
||||
mVerify(false)
|
||||
mVerify(false),
|
||||
mIs64BitInstruction(true),
|
||||
mListApi(false),
|
||||
mListSymbols(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -38,9 +41,9 @@ void NsoProcess::setVerifyMode(bool verify)
|
|||
mVerify = verify;
|
||||
}
|
||||
|
||||
void NsoProcess::setInstructionType(nn::hac::meta::InstructionType type)
|
||||
void NsoProcess::setIs64BitInstruction(bool flag)
|
||||
{
|
||||
mRoMeta.setInstructionType(type);
|
||||
mRoMeta.setIs64BitInstruction(flag);
|
||||
}
|
||||
|
||||
void NsoProcess::setListApi(bool listApi)
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
void setCliOutputMode(CliOutputMode type);
|
||||
void setVerifyMode(bool verify);
|
||||
|
||||
void setInstructionType(nn::hac::meta::InstructionType type);
|
||||
void setIs64BitInstruction(bool flag);
|
||||
void setListApi(bool listApi);
|
||||
void setListSymbols(bool listSymbols);
|
||||
|
||||
|
@ -32,7 +32,7 @@ private:
|
|||
fnd::SharedPtr<fnd::IFile> mFile;
|
||||
CliOutputMode mCliOutputMode;
|
||||
bool mVerify;
|
||||
nn::hac::meta::InstructionType mInstructionType;
|
||||
bool mIs64BitInstruction;
|
||||
bool mListApi;
|
||||
bool mListSymbols;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
RoMetadataProcess::RoMetadataProcess() :
|
||||
mCliOutputMode(_BIT(OUTPUT_BASIC)),
|
||||
mInstructionType(nn::hac::meta::INSTR_64BIT),
|
||||
mIs64BitInstruction(true),
|
||||
mListApi(false),
|
||||
mListSymbols(false),
|
||||
mApiInfo(),
|
||||
|
@ -57,9 +57,9 @@ void RoMetadataProcess::setCliOutputMode(CliOutputMode type)
|
|||
mCliOutputMode = type;
|
||||
}
|
||||
|
||||
void RoMetadataProcess::setInstructionType(nn::hac::meta::InstructionType type)
|
||||
void RoMetadataProcess::setIs64BitInstruction(bool flag)
|
||||
{
|
||||
mInstructionType = type;
|
||||
mIs64BitInstruction = flag;
|
||||
}
|
||||
|
||||
void RoMetadataProcess::setListApi(bool listApi)
|
||||
|
@ -126,7 +126,7 @@ void RoMetadataProcess::importApiList()
|
|||
|
||||
if (mDynSym.size > 0)
|
||||
{
|
||||
mSymbolList.parseData(mRoBlob.data() + mDynSym.offset, mDynSym.size, mRoBlob.data() + mDynStr.offset, mDynStr.size, mInstructionType == nn::hac::meta::INSTR_64BIT);
|
||||
mSymbolList.parseData(mRoBlob.data() + mDynSym.offset, mDynSym.size, mRoBlob.data() + mDynStr.offset, mDynStr.size, mIs64BitInstruction);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
|
||||
void setCliOutputMode(CliOutputMode type);
|
||||
|
||||
void setInstructionType(nn::hac::meta::InstructionType type);
|
||||
void setIs64BitInstruction(bool flag);
|
||||
void setListApi(bool listApi);
|
||||
void setListSymbols(bool listSymbols);
|
||||
|
||||
|
@ -37,7 +37,7 @@ private:
|
|||
const std::string kModuleName = "RoMetadataProcess";
|
||||
|
||||
CliOutputMode mCliOutputMode;
|
||||
nn::hac::meta::InstructionType mInstructionType;
|
||||
bool mIs64BitInstruction;
|
||||
bool mListApi;
|
||||
bool mListSymbols;
|
||||
|
||||
|
|
|
@ -138,9 +138,9 @@ bool UserSettings::isListSymbols() const
|
|||
return mListSymbols;
|
||||
}
|
||||
|
||||
nn::hac::meta::InstructionType UserSettings::getInstType() const
|
||||
bool UserSettings::getIs64BitInstruction() const
|
||||
{
|
||||
return mInstructionType;
|
||||
return mIs64BitInstruction;
|
||||
}
|
||||
|
||||
const sOptional<std::string>& UserSettings::getXciUpdatePath() const
|
||||
|
@ -564,9 +564,9 @@ void UserSettings::populateUserSettings(sCmdArgs& args)
|
|||
|
||||
// determine the architecture type for NSO/NRO
|
||||
if (args.inst_type.isSet)
|
||||
mInstructionType = getInstructionTypeFromString(*args.inst_type);
|
||||
mIs64BitInstruction = getIs64BitInstructionFromString(*args.inst_type);
|
||||
else
|
||||
mInstructionType = nn::hac::meta::INSTR_64BIT; // default 64bit
|
||||
mIs64BitInstruction = true; // default 64bit
|
||||
|
||||
mListApi = args.list_api.isSet;
|
||||
mListSymbols = args.list_sym.isSet;
|
||||
|
@ -800,7 +800,7 @@ bool UserSettings::determineValidNacpFromSample(const fnd::Vec<byte_t>& sample)
|
|||
|
||||
const nn::hac::sApplicationControlProperty* data = (const nn::hac::sApplicationControlProperty*)sample.data();
|
||||
|
||||
if (data->logo_type > nn::hac::nacp::LOGO_Nintendo)
|
||||
if (data->logo_type > (byte_t)nn::hac::nacp::LogoType::Nintendo)
|
||||
return false;
|
||||
|
||||
if (data->display_version[0] == 0)
|
||||
|
@ -862,20 +862,20 @@ bool UserSettings::determineValidEsTikFromSample(const fnd::Vec<byte_t>& sample)
|
|||
return true;
|
||||
}
|
||||
|
||||
nn::hac::meta::InstructionType UserSettings::getInstructionTypeFromString(const std::string & type_str)
|
||||
bool UserSettings::getIs64BitInstructionFromString(const std::string & type_str)
|
||||
{
|
||||
std::string str = type_str;
|
||||
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
|
||||
|
||||
nn::hac::meta::InstructionType type;
|
||||
bool flag;
|
||||
if (str == "32bit")
|
||||
type = nn::hac::meta::INSTR_32BIT;
|
||||
flag = false;
|
||||
else if (str == "64bit")
|
||||
type = nn::hac::meta::INSTR_64BIT;
|
||||
flag = true;
|
||||
else
|
||||
throw fnd::Exception(kModuleName, "Unsupported instruction type: " + str);
|
||||
|
||||
return type;
|
||||
return flag;
|
||||
}
|
||||
|
||||
void UserSettings::getHomePath(std::string& path) const
|
||||
|
@ -944,7 +944,7 @@ void UserSettings::dumpKeyConfig() const
|
|||
dumpAesKey(aes_key, "Extended Header Encryption Key", 2);
|
||||
|
||||
|
||||
if (mKeyCfg.getAcidSignKey(rsa2048_key) == true)
|
||||
if (mKeyCfg.getAcidSignKey(rsa2048_key, 0x00) == true)
|
||||
dumpRsa2048Key(rsa2048_key, "ACID Signer Key", 1);
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
bool isListFs() const;
|
||||
bool isListApi() const;
|
||||
bool isListSymbols() const;
|
||||
nn::hac::meta::InstructionType getInstType() const;
|
||||
bool getIs64BitInstruction() const;
|
||||
|
||||
// specialised paths
|
||||
const sOptional<std::string>& getXciUpdatePath() const;
|
||||
|
@ -114,7 +114,7 @@ private:
|
|||
|
||||
bool mListApi;
|
||||
bool mListSymbols;
|
||||
nn::hac::meta::InstructionType mInstructionType;
|
||||
bool mIs64BitInstruction;
|
||||
|
||||
void populateCmdArgs(const std::vector<std::string>& arg_list, sCmdArgs& cmd_args);
|
||||
void populateKeyset(sCmdArgs& args);
|
||||
|
@ -126,7 +126,7 @@ private:
|
|||
bool determineValidNacpFromSample(const fnd::Vec<byte_t>& sample) const;
|
||||
bool determineValidEsCertFromSample(const fnd::Vec<byte_t>& sample) const;
|
||||
bool determineValidEsTikFromSample(const fnd::Vec<byte_t>& sample) const;
|
||||
nn::hac::meta::InstructionType getInstructionTypeFromString(const std::string& type_str);
|
||||
bool getIs64BitInstructionFromString(const std::string& type_str);
|
||||
void getHomePath(std::string& path) const;
|
||||
void getSwitchPath(std::string& path) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue