diff options
| author | Zach Hilman <zachhilman@gmail.com> | 2018-08-25 11:48:23 -0400 |
|---|---|---|
| committer | Zach Hilman <zachhilman@gmail.com> | 2018-09-04 14:27:33 -0400 |
| commit | 57769f8d0ddf039e5f6179ac12fe6fc88a130f29 (patch) | |
| tree | ac5ecdfc187f04a677b61f62eea6d6614326e636 /src/core/loader/xci.cpp | |
| parent | a9397ca8c0348e74a8ff7e8ed4b884a8b2a44ea6 (diff) | |
card_image: Parse XCI secure partition with NSP
Eliminated duplicate code and adds support for Rev1+ carts
Diffstat (limited to 'src/core/loader/xci.cpp')
| -rw-r--r-- | src/core/loader/xci.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp index 9dc4d1f358..75b998faaa 100644 --- a/src/core/loader/xci.cpp +++ b/src/core/loader/xci.cpp @@ -17,8 +17,7 @@ namespace Loader { AppLoader_XCI::AppLoader_XCI(FileSys::VirtualFile file) : AppLoader(file), xci(std::make_unique<FileSys::XCI>(file)), - nca_loader(std::make_unique<AppLoader_NCA>( - xci->GetNCAFileByType(FileSys::NCAContentType::Program))) { + nca_loader(std::make_unique<AppLoader_NCA>(xci->GetProgramNCAFile())) { if (xci->GetStatus() != ResultStatus::Success) return; const auto control_nca = xci->GetNCAByType(FileSys::NCAContentType::Control); @@ -64,11 +63,11 @@ ResultStatus AppLoader_XCI::Load(Kernel::SharedPtr<Kernel::Process>& process) { if (xci->GetProgramNCAStatus() != ResultStatus::Success) return xci->GetProgramNCAStatus(); - const auto nca = xci->GetNCAFileByType(FileSys::NCAContentType::Program); + const auto nca = xci->GetProgramNCA(); if (nca == nullptr && !Core::Crypto::KeyManager::KeyFileExists(false)) return ResultStatus::ErrorMissingProductionKeyFile; - auto result = nca_loader->Load(process); + const auto result = nca_loader->Load(process); if (result != ResultStatus::Success) return result; |
