1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-22 20:06:40 +00:00

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. */
const auto node_size = IndirectStorage::QueryNodeStorageSize(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. */
const s64 indirect_data_size = patch_info.indirect_offset;
@ -1154,8 +1154,8 @@ namespace ams::fssystem {
HierarchicalIntegrityVerificationInformation 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(level_hash_info.max_layers <= IntegrityMaxLayerCount, fs::ResultInvalidHierarchicalIntegrityVerificationLayerCount());
R_UNLESS(IntegrityMinLayerCount <= level_hash_info.max_layers, fs::ResultInvalidNcaHierarchicalIntegrityVerificationLayerCount());
R_UNLESS(level_hash_info.max_layers <= IntegrityMaxLayerCount, fs::ResultInvalidNcaHierarchicalIntegrityVerificationLayerCount());
/* Get the base storage size. */
s64 base_storage_size;

View file

@ -279,16 +279,18 @@ namespace ams::fs {
R_DEFINE_ERROR_RESULT(RomHierarchicalSha256BaseStorageTooLarge, 4074);
R_DEFINE_ERROR_RESULT(RomHierarchicalSha256HashVerificationFailed, 4075);
R_DEFINE_ERROR_RESULT(RomNcaInvalidCompressionInfo, 4083);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashType, 4084);
R_DEFINE_ERROR_RESULT(RomNcaInvalidIntegrityLayerInfoOffset, 4085);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashDataSize, 4086);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashDataOffset, 4087);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashDataHash, 4088);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashType, 4089);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashDataSize, 4090);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashDataOffset, 4091);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashDataHash, 4092);
R_DEFINE_ERROR_RESULT(RomNcaInvalidHierarchicalIntegrityVerificationLayerCount, 4081);
R_DEFINE_ERROR_RESULT(RomNcaInvalidNcaIndirectStorageOutOfRange, 4082);
R_DEFINE_ERROR_RESULT(RomNcaInvalidCompressionInfo, 4083);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashType, 4084);
R_DEFINE_ERROR_RESULT(RomNcaInvalidIntegrityLayerInfoOffset, 4085);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashDataSize, 4086);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashDataOffset, 4087);
R_DEFINE_ERROR_RESULT(RomNcaInvalidPatchMetaDataHashDataHash, 4088);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashType, 4089);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashDataSize, 4090);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashDataOffset, 4091);
R_DEFINE_ERROR_RESULT(RomNcaInvalidSparseMetaDataHashDataHash, 4092);
R_DEFINE_ERROR_RANGE(RomIntegrityVerificationStorageCorrupted, 4141, 4179);
R_DEFINE_ERROR_RESULT(IncorrectRomIntegrityVerificationMagic, 4142);
@ -357,7 +359,9 @@ namespace ams::fs {
R_DEFINE_ERROR_RESULT(HierarchicalSha256HashVerificationFailed, 4535);
/* TODO: Range? */
R_DEFINE_ERROR_RESULT(InvalidNcaHeader1SignatureKeyGeneration, 4543);
R_DEFINE_ERROR_RESULT(InvalidNcaHierarchicalIntegrityVerificationLayerCount, 4541);
R_DEFINE_ERROR_RESULT(InvalidNcaIndirectStorageOutOfRange, 4542);
R_DEFINE_ERROR_RESULT(InvalidNcaHeader1SignatureKeyGeneration, 4543);
/* TODO: Range? */
R_DEFINE_ERROR_RESULT(InvalidCompressedStorageSize, 4547);