Fully fixed now
All checks were successful
eden-license / license-header (pull_request) Successful in 29s
All checks were successful
eden-license / license-header (pull_request) Successful in 29s
This commit is contained in:
parent
ffe2512eef
commit
2b21b50b58
2 changed files with 25 additions and 3 deletions
|
@ -41,7 +41,7 @@ struct HashSalt {
|
||||||
static_assert(std::is_trivial_v<HashSalt>);
|
static_assert(std::is_trivial_v<HashSalt>);
|
||||||
static_assert(sizeof(HashSalt) == HashSalt::Size);
|
static_assert(sizeof(HashSalt) == HashSalt::Size);
|
||||||
|
|
||||||
constexpr inline size_t IntegrityMinLayerCount = 4;
|
constexpr inline size_t IntegrityMinLayerCount = 2;
|
||||||
constexpr inline size_t IntegrityMaxLayerCount = 7;
|
constexpr inline size_t IntegrityMaxLayerCount = 7;
|
||||||
constexpr inline size_t IntegrityLayerCountSave = 5;
|
constexpr inline size_t IntegrityLayerCountSave = 5;
|
||||||
constexpr inline size_t IntegrityLayerCountSaveDataMeta = 4;
|
constexpr inline size_t IntegrityLayerCountSaveDataMeta = 4;
|
||||||
|
|
|
@ -1331,8 +1331,30 @@ Result NcaFileSystemDriver::CreateIntegrityVerificationStorageImpl(
|
||||||
R_UNLESS(last_layer_info_offset + layer_info.size <= layer_info_offset,
|
R_UNLESS(last_layer_info_offset + layer_info.size <= layer_info_offset,
|
||||||
ResultRomNcaInvalidIntegrityLayerInfoOffset);
|
ResultRomNcaInvalidIntegrityLayerInfoOffset);
|
||||||
}
|
}
|
||||||
storage_info.SetDataStorage(std::make_shared<OffsetVfsFile>(
|
|
||||||
std::move(base_storage), layer_info.size, last_layer_info_offset));
|
switch (level_hash_info.max_layers - 1) {
|
||||||
|
case FileSys::HierarchicalIntegrityVerificationStorage::HierarchicalStorageInformation::MasterStorage:
|
||||||
|
storage_info.SetMasterHashStorage(std::make_shared<OffsetVfsFile>(std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||||
|
break;
|
||||||
|
case FileSys::HierarchicalIntegrityVerificationStorage::HierarchicalStorageInformation::Layer1Storage:
|
||||||
|
storage_info.SetLayer1HashStorage(std::make_shared<OffsetVfsFile>(std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||||
|
break;
|
||||||
|
case FileSys::HierarchicalIntegrityVerificationStorage::HierarchicalStorageInformation::Layer2Storage:
|
||||||
|
storage_info.SetLayer2HashStorage(std::make_shared<OffsetVfsFile>(std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||||
|
break;
|
||||||
|
case FileSys::HierarchicalIntegrityVerificationStorage::HierarchicalStorageInformation::Layer3Storage:
|
||||||
|
storage_info.SetLayer3HashStorage(std::make_shared<OffsetVfsFile>(std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||||
|
break;
|
||||||
|
case FileSys::HierarchicalIntegrityVerificationStorage::HierarchicalStorageInformation::Layer4Storage:
|
||||||
|
storage_info.SetLayer4HashStorage(std::make_shared<OffsetVfsFile>(std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||||
|
break;
|
||||||
|
case FileSys::HierarchicalIntegrityVerificationStorage::HierarchicalStorageInformation::Layer5Storage:
|
||||||
|
storage_info.SetLayer5HashStorage(std::make_shared<OffsetVfsFile>(std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||||
|
break;
|
||||||
|
case FileSys::HierarchicalIntegrityVerificationStorage::HierarchicalStorageInformation::DataStorage:
|
||||||
|
storage_info.SetDataStorage(std::make_shared<OffsetVfsFile>(std::move(base_storage), layer_info.size, last_layer_info_offset));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Make the integrity romfs storage.
|
// Make the integrity romfs storage.
|
||||||
auto integrity_storage = std::make_shared<IntegrityRomFsStorage>();
|
auto integrity_storage = std::make_shared<IntegrityRomFsStorage>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue