fs: update a few loose missed results

This commit is contained in:
Michael Scire 2022-03-25 10:02:55 -07:00
parent ec44eaa263
commit 5ffbed1bee
2 changed files with 18 additions and 14 deletions

View file

@ -939,7 +939,7 @@ namespace ams::fssystem {
/* Determine the storage sizes. */ /* Determine the storage sizes. */
const auto node_size = IndirectStorage::QueryNodeStorageSize(header.entry_count); const auto node_size = IndirectStorage::QueryNodeStorageSize(header.entry_count);
const auto entry_size = IndirectStorage::QueryEntryStorageSize(header.entry_count); const auto entry_size = IndirectStorage::QueryEntryStorageSize(header.entry_count);
R_UNLESS(node_size + entry_size <= patch_info.indirect_size, fs::ResultInvalidIndirectStorageSize()); R_UNLESS(node_size + entry_size <= patch_info.indirect_size, fs::ResultInvalidNcaIndirectStorageOutOfRange());
/* Get the indirect data size. */ /* Get the indirect data size. */
const s64 indirect_data_size = patch_info.indirect_offset; const s64 indirect_data_size = patch_info.indirect_offset;
@ -1154,8 +1154,8 @@ namespace ams::fssystem {
HierarchicalIntegrityVerificationInformation level_hash_info; HierarchicalIntegrityVerificationInformation level_hash_info;
std::memcpy(std::addressof(level_hash_info), std::addressof(meta_info.level_hash_info), sizeof(level_hash_info)); std::memcpy(std::addressof(level_hash_info), std::addressof(meta_info.level_hash_info), sizeof(level_hash_info));
R_UNLESS(IntegrityMinLayerCount <= level_hash_info.max_layers, fs::ResultInvalidHierarchicalIntegrityVerificationLayerCount()); R_UNLESS(IntegrityMinLayerCount <= level_hash_info.max_layers, fs::ResultInvalidNcaHierarchicalIntegrityVerificationLayerCount());
R_UNLESS(level_hash_info.max_layers <= IntegrityMaxLayerCount, fs::ResultInvalidHierarchicalIntegrityVerificationLayerCount()); R_UNLESS(level_hash_info.max_layers <= IntegrityMaxLayerCount, fs::ResultInvalidNcaHierarchicalIntegrityVerificationLayerCount());
/* Get the base storage size. */ /* Get the base storage size. */
s64 base_storage_size; s64 base_storage_size;

View file

@ -279,6 +279,8 @@ namespace ams::fs {
R_DEFINE_ERROR_RESULT(RomHierarchicalSha256BaseStorageTooLarge, 4074); R_DEFINE_ERROR_RESULT(RomHierarchicalSha256BaseStorageTooLarge, 4074);
R_DEFINE_ERROR_RESULT(RomHierarchicalSha256HashVerificationFailed, 4075); R_DEFINE_ERROR_RESULT(RomHierarchicalSha256HashVerificationFailed, 4075);
R_DEFINE_ERROR_RESULT(RomNcaInvalidHierarchicalIntegrityVerificationLayerCount, 4081);
R_DEFINE_ERROR_RESULT(RomNcaInvalidNcaIndirectStorageOutOfRange, 4082);
R_DEFINE_ERROR_RESULT(RomNcaInvalidCompressionInfo, 4083); R_DEFINE_ERROR_RESULT(RomNcaInvalidCompressionInfo, 4083);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashType, 4084); R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashType, 4084);
R_DEFINE_ERROR_RESULT(RomNcaInvalidIntegrityLayerInfoOffset, 4085); R_DEFINE_ERROR_RESULT(RomNcaInvalidIntegrityLayerInfoOffset, 4085);
@ -357,6 +359,8 @@ namespace ams::fs {
R_DEFINE_ERROR_RESULT(HierarchicalSha256HashVerificationFailed, 4535); R_DEFINE_ERROR_RESULT(HierarchicalSha256HashVerificationFailed, 4535);
/* TODO: Range? */ /* TODO: Range? */
R_DEFINE_ERROR_RESULT(InvalidNcaHierarchicalIntegrityVerificationLayerCount, 4541);
R_DEFINE_ERROR_RESULT(InvalidNcaIndirectStorageOutOfRange, 4542);
R_DEFINE_ERROR_RESULT(InvalidNcaHeader1SignatureKeyGeneration, 4543); R_DEFINE_ERROR_RESULT(InvalidNcaHeader1SignatureKeyGeneration, 4543);
/* TODO: Range? */ /* TODO: Range? */