From 44229f5986982fd9ec9b28c0b10fa2f548eaad4f Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Mon, 3 May 2021 15:56:40 -0700 Subject: [PATCH] Rename some save data results --- build/CodeGen/results.csv | 92 +++++++++---------- .../Fs/ApplicationSaveDataManagement.cs | 4 +- src/LibHac/Fs/ResultFs.cs | 92 +++++++++---------- .../FsSrv/Impl/ProgramRegistryManager.cs | 8 +- src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs | 2 +- .../FsSrv/ProgramIndexRegistryService.cs | 2 +- src/LibHac/FsSrv/SaveDataFileSystemService.cs | 4 +- src/LibHac/FsSrv/SaveDataIndexer.cs | 4 +- src/LibHac/FsSrv/SaveDataIndexerLite.cs | 4 +- src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs | 4 +- .../FsSystem/Save/SaveDataFileSystem.cs | 2 +- .../FsSystem/Save/SaveDataFileSystemCore.cs | 2 +- src/LibHac/FsSystem/Save/SaveResults.cs | 8 +- 13 files changed, 114 insertions(+), 114 deletions(-) diff --git a/build/CodeGen/results.csv b/build/CodeGen/results.csv index 93147e45..4107e391 100644 --- a/build/CodeGen/results.csv +++ b/build/CodeGen/results.csv @@ -288,7 +288,7 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,3000,7999,,,Internal, 2,3001,,,,NotImplemented, 2,3002,,,,UnsupportedVersion, -2,3003,,,,SaveDataPathAlreadyExists, +2,3003,,,,AlreadyExists, 2,3005,,,,OutOfRange, 2,3099,,,,, @@ -605,7 +605,7 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,4141,4179,,,RomIntegrityVerificationStorageCorrupted, 2,4142,,,,IncorrectRomIntegrityVerificationMagic, -2,4143,,,,InvalidRomZeroHash, +2,4143,,,,InvalidRomZeroSignature, 2,4144,,,,RomNonRealDataVerificationFailed, 2,4151,4159,,,RomRealDataVerificationFailed, @@ -621,7 +621,7 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,4187,,,,InvalidRomSha256PartitionMetaDataSize, 2,4201,4219,,,RomBuiltInStorageCorrupted, -2,4202,,,,RomGptHeaderVerificationFailed, +2,4202,,,,RomGptHeaderSignatureVerificationFailed, 2,4241,4259,,,RomHostFileSystemCorrupted, 2,4242,,,,RomHostEntryCorrupted, @@ -637,38 +637,38 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,4281,,,,InvalidRomStorageSize,The RomFs metadata is located beyond the end of the provided storage. 2,4301,4499,,,SaveDataCorrupted, -2,4302,,,,UnsupportedSaveVersion, +2,4302,,,,UnsupportedSaveDataVersion, 2,4303,,,,InvalidSaveDataEntryType, -2,4311,4319,,,JournalIntegritySaveDataCorrupted, -2,4312,,,,InvalidJournalIntegritySaveDataMasterDataSize, -2,4313,,,,InconsistentJournalIntegritySaveDataCommitState, -2,4314,,,,InvalidJournalIntegritySaveDataStorageSize, -2,4315,,,,InvalidJournalIntegritySaveDataMasterHeader, -2,4316,,,,InvalidJournalIntegritySaveDataSignature, -2,4317,,,,IncorrectJournalIntegritySaveDataLayoutHeaderMagic, +2,4311,4319,,,SaveDataFileSystemCorrupted, +2,4312,,,,InvalidJournalIntegritySaveDataHashSize, +2,4313,,,,InvalidJournalIntegritySaveDataCommitState, +2,4314,,,,InvalidJournalIntegritySaveDataControlAreaSize, +2,4315,,,,JournalIntegritySaveDataControlAreaVerificationFailed, +2,4316,,,,JournalIntegritySaveDataMasterSignatureVerificationFailed, +2,4317,,,,IncorrectJournalIntegritySaveDataMagicCode, -2,4321,4329,,,DuplexStorageCorrupted, -2,4322,,,,IncorrectHierarchicalDuplexStorageControlAreaMagic, +2,4321,4329,,,SaveDataDuplexStorageCorrupted, +2,4322,,,,IncorrectDuplexMagicCode, 2,4323,,,,DuplexStorageAccessOutOfRange, -2,4331,4339,,,RemapStorageCorrupted, -2,4332,,,,InvalidRemapStorageMapEntryCount, -2,4333,,,,InvalidRemapStorageOffset, -2,4334,,,,InvalidRemapStorageSize, -2,4335,,,,InvalidRemapStorageAlignment, -2,4336,,,,InvalidRemapStorageStorageType, -2,4337,,,,InvalidRemapStorageNewMapEntryOffset,The range of the new map entry overlaps with the range of an existing map entry. -2,4338,,,,RemapStorageStorageNotRegistered,The storage for the map entry's storage type hasn't been registered. -2,4339,,,,RemapStorageInvalidRegisteredStorageSize,The storage registered for the map entry's storage type is too short to contain the physical range specified in the map entry. +2,4331,4339,,,SaveDataMapCorrupted, +2,4332,,,,InvalidMapEntryCount, +2,4333,,,,InvalidMapOffset, +2,4334,,,,InvalidMapSize, +2,4335,,,,InvalidMapAlignment, +2,4336,,,,InvalidMapStorageType, +2,4337,,,,MapAddressAlreadyRegistered,The range of the new map entry overlaps with the range of an existing map entry. +2,4338,,,,MapStorageNotFound,The storage for the map entry's storage type hasn't been registered. +2,4339,,,,InvalidMapStorageSize,The storage registered for the map entry's storage type is too short to contain the physical range specified in the map entry. -2,4341,4349,,,UnionStorageCorrupted, -2,4342,,,,InvalidUnionStorageBlockSize, -2,4343,,,,InvalidUnionStorageLogOffsetAlignment, -2,4344,,,,InvalidUnionStorageLogOffsetForCommit, -2,4345,,,,InvalidUnionStorageLogOffset, +2,4341,4349,,,SaveDataLogCorrupted, +2,4342,,,,InvalidLogBlockSize, +2,4343,,,,InvalidLogOffset, +2,4344,,,,UnexpectedEndOfLog, +2,4345,,,,LogNotFound, -2,4352,,,,InvalidSaveDataThumbnailHash, +2,4352,,,,ThumbnailHashVerificationFailed, 2,4357,,,,InvalidSaveDataInternalStorageIntegritySeedSize, 2,4358,,,,, 2,4359,,,,, @@ -681,7 +681,7 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,4372,,,,ClearedSaveDataRealDataVerificationFailed, 2,4373,,,,UnclearedSaveDataRealDataVerificationFailed, -2,4402,,,,SaveDataInvalidGptPartitionSignature, +2,4402,,,,SaveDataGptHeaderSignatureVerificationFailed, 2,4411,4419,,,SaveDataCoreFileSystemCorrupted, 2,4412,,,,IncorrectSaveDataControlAreaMagic, @@ -706,7 +706,7 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,4454,,,,InvalidMappingTableVirtualIndex, 2,4461,4479,,,SaveDataDatabaseCorrupted, -2,4462,,,,SaveDataAllocationTableCorrupted, +2,4462,,,,InvalidSaveDataAllocationTableBlock, 2,4463,,,,InvalidSaveDataKeyValueListElementIndex, 2,4464,,,,SaveDataAllocationTableIteratedRangeEntry, 2,4465,,,,InvalidSaveDataAllocationTableOffset, @@ -714,18 +714,18 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,4467,,,,InvalidSaveDataKeyValueListEntryIndex, 2,4468,,,,InvalidSaveDataBitmapIndex, -2,4481,4489,,,SaveDataExtenderCorrupted, -2,4482,,,,IncorrectSaveDataExtensionContextMagic, +2,4481,4489,,,SaveDataExtensionContextCorrupted, +2,4482,,,,IncorrectSaveDataExtensionContextMagicCode, 2,4483,,,,InvalidSaveDataExtensionContextState, -2,4484,,,,SaveDataExtensionContextMismatch,The extension context doesn't match the current save data. -2,4485,,,,InvalidSaveDataExtenderSize, +2,4484,,,,DifferentSaveDataExtensionContextParameter,The extension context doesn't match the current save data. +2,4485,,,,InvalidSaveDataExtensionContextParameter, 2,4491,4499,,,IntegritySaveDataCorrupted, -2,4492,,,,InvalidIntegritySaveDataMasterDataSize, -2,4494,,,,InvalidIntegritySaveDataStorageSize, -2,4495,,,,InvalidIntegritySaveDataMasterHeader, -2,4496,,,,InvalidIntegritySaveDataSignature, -2,4497,,,,IncorrectIntegritySaveDataLayoutHeaderMagic, +2,4492,,,,InvalidIntegritySaveDataHashSize, +2,4494,,,,InvalidIntegritySaveDataControlAreaSize, +2,4495,,,,IntegritySaveDataControlAreaVerificationFailed, +2,4496,,,,IntegritySaveDataMasterSignatureVerificationFailed, +2,4497,,,,IncorrectIntegritySaveDataMagicCode, 2,4501,4599,,,NcaCorrupted, 2,4508,,,,NcaBaseStorageOutOfRangeA, @@ -1033,16 +1033,16 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,6467,,,,SaveDataRootPathUnavailable, 2,6600,6699,,,NotFound, -2,6602,,,,SaveDataFileNotFound, -2,6603,,,,SaveDataDirectoryNotFound, -2,6604,,,,SaveDataFileTableEntryNotFound, -2,6605,,,,TargetProgramNotFound,Specified program is not found in the program registry. -2,6606,,,,TargetProgramIndexNotFound,Specified program index is not found +2,6602,,,,FileNotFound, +2,6603,,,,DirectoryNotFound, +2,6604,,,,DatabaseKeyNotFound, +2,6605,,,,ProgramInfoNotFound,Specified program is not found in the program registry. +2,6606,,,,ProgramIndexNotFound,Specified program index is not found 2,6700,6799,,,OutOfResource, 2,6705,,,,BufferAllocationFailed, 2,6706,,,,MappingTableFull, -2,6707,,,,AllocationTableInsufficientFreeBlocks, +2,6707,,,,AllocationTableFull, 2,6709,,,,OpenCountLimit, 2,6710,,,,MultiCommitFileSystemLimit,The maximum number of file systems have been added to the multi-commit manager. @@ -1054,7 +1054,7 @@ Module,DescriptionStart,DescriptionEnd,Flags,Namespace,Name,Summary 2,6903,,,,BisProxyInvalidated, 2,6904,,,,NcaDigestInconsistent, 2,6905,,,,NotMounted, -2,6906,,,,SaveDataIsExtending, +2,6906,,,,SaveDataExtending, 2,6907,,,,SaveDataToExpandIsProvisionallyCommitted, 2,7002,,,,, diff --git a/src/LibHac/Fs/ApplicationSaveDataManagement.cs b/src/LibHac/Fs/ApplicationSaveDataManagement.cs index 34e1616b..6387dbb6 100644 --- a/src/LibHac/Fs/ApplicationSaveDataManagement.cs +++ b/src/LibHac/Fs/ApplicationSaveDataManagement.cs @@ -364,7 +364,7 @@ namespace LibHac.Fs if (!allowExisting) { - return ResultFs.SaveDataPathAlreadyExists.Log(); + return ResultFs.AlreadyExists.Log(); } rc = ExtendSaveDataIfNeeded(fs, out requiredSizeLocal, spaceId, info.SaveDataId, dataSize, journalSize); @@ -375,7 +375,7 @@ namespace LibHac.Fs return Result.Success; } - if (ResultFs.SaveDataIsExtending.Includes(rc)) + if (ResultFs.SaveDataExtending.Includes(rc)) { return ResultFs.SaveDataCorrupted.LogConverted(rc); } diff --git a/src/LibHac/Fs/ResultFs.cs b/src/LibHac/Fs/ResultFs.cs index 69b4756e..9692f072 100644 --- a/src/LibHac/Fs/ResultFs.cs +++ b/src/LibHac/Fs/ResultFs.cs @@ -465,7 +465,7 @@ namespace LibHac.Fs /// Error code: 2002-3002; Inner value: 0x177402 public static Result.Base UnsupportedVersion => new Result.Base(ModuleFs, 3002); /// Error code: 2002-3003; Inner value: 0x177602 - public static Result.Base SaveDataPathAlreadyExists => new Result.Base(ModuleFs, 3003); + public static Result.Base AlreadyExists => new Result.Base(ModuleFs, 3003); /// Error code: 2002-3005; Inner value: 0x177a02 public static Result.Base OutOfRange => new Result.Base(ModuleFs, 3005); /// Error code: 2002-3099; Inner value: 0x183602 @@ -1072,7 +1072,7 @@ namespace LibHac.Fs /// Error code: 2002-4142; Inner value: 0x205c02 public static Result.Base IncorrectRomIntegrityVerificationMagic => new Result.Base(ModuleFs, 4142); /// Error code: 2002-4143; Inner value: 0x205e02 - public static Result.Base InvalidRomZeroHash => new Result.Base(ModuleFs, 4143); + public static Result.Base InvalidRomZeroSignature => new Result.Base(ModuleFs, 4143); /// Error code: 2002-4144; Inner value: 0x206002 public static Result.Base RomNonRealDataVerificationFailed => new Result.Base(ModuleFs, 4144); @@ -1101,7 +1101,7 @@ namespace LibHac.Fs /// Error code: 2002-4201; Range: 4201-4219; Inner value: 0x20d202 public static Result.Base RomBuiltInStorageCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4201, 4219); } /// Error code: 2002-4202; Inner value: 0x20d402 - public static Result.Base RomGptHeaderVerificationFailed => new Result.Base(ModuleFs, 4202); + public static Result.Base RomGptHeaderSignatureVerificationFailed => new Result.Base(ModuleFs, 4202); /// Error code: 2002-4241; Range: 4241-4259; Inner value: 0x212202 public static Result.Base RomHostFileSystemCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4241, 4259); } @@ -1129,64 +1129,64 @@ namespace LibHac.Fs /// Error code: 2002-4301; Range: 4301-4499; Inner value: 0x219a02 public static Result.Base SaveDataCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4301, 4499); } /// Error code: 2002-4302; Inner value: 0x219c02 - public static Result.Base UnsupportedSaveVersion => new Result.Base(ModuleFs, 4302); + public static Result.Base UnsupportedSaveDataVersion => new Result.Base(ModuleFs, 4302); /// Error code: 2002-4303; Inner value: 0x219e02 public static Result.Base InvalidSaveDataEntryType => new Result.Base(ModuleFs, 4303); /// Error code: 2002-4311; Range: 4311-4319; Inner value: 0x21ae02 - public static Result.Base JournalIntegritySaveDataCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4311, 4319); } + public static Result.Base SaveDataFileSystemCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4311, 4319); } /// Error code: 2002-4312; Inner value: 0x21b002 - public static Result.Base InvalidJournalIntegritySaveDataMasterDataSize => new Result.Base(ModuleFs, 4312); + public static Result.Base InvalidJournalIntegritySaveDataHashSize => new Result.Base(ModuleFs, 4312); /// Error code: 2002-4313; Inner value: 0x21b202 - public static Result.Base InconsistentJournalIntegritySaveDataCommitState => new Result.Base(ModuleFs, 4313); + public static Result.Base InvalidJournalIntegritySaveDataCommitState => new Result.Base(ModuleFs, 4313); /// Error code: 2002-4314; Inner value: 0x21b402 - public static Result.Base InvalidJournalIntegritySaveDataStorageSize => new Result.Base(ModuleFs, 4314); + public static Result.Base InvalidJournalIntegritySaveDataControlAreaSize => new Result.Base(ModuleFs, 4314); /// Error code: 2002-4315; Inner value: 0x21b602 - public static Result.Base InvalidJournalIntegritySaveDataMasterHeader => new Result.Base(ModuleFs, 4315); + public static Result.Base JournalIntegritySaveDataControlAreaVerificationFailed => new Result.Base(ModuleFs, 4315); /// Error code: 2002-4316; Inner value: 0x21b802 - public static Result.Base InvalidJournalIntegritySaveDataSignature => new Result.Base(ModuleFs, 4316); + public static Result.Base JournalIntegritySaveDataMasterSignatureVerificationFailed => new Result.Base(ModuleFs, 4316); /// Error code: 2002-4317; Inner value: 0x21ba02 - public static Result.Base IncorrectJournalIntegritySaveDataLayoutHeaderMagic => new Result.Base(ModuleFs, 4317); + public static Result.Base IncorrectJournalIntegritySaveDataMagicCode => new Result.Base(ModuleFs, 4317); /// Error code: 2002-4321; Range: 4321-4329; Inner value: 0x21c202 - public static Result.Base DuplexStorageCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4321, 4329); } + public static Result.Base SaveDataDuplexStorageCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4321, 4329); } /// Error code: 2002-4322; Inner value: 0x21c402 - public static Result.Base IncorrectHierarchicalDuplexStorageControlAreaMagic => new Result.Base(ModuleFs, 4322); + public static Result.Base IncorrectDuplexMagicCode => new Result.Base(ModuleFs, 4322); /// Error code: 2002-4323; Inner value: 0x21c602 public static Result.Base DuplexStorageAccessOutOfRange => new Result.Base(ModuleFs, 4323); /// Error code: 2002-4331; Range: 4331-4339; Inner value: 0x21d602 - public static Result.Base RemapStorageCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4331, 4339); } + public static Result.Base SaveDataMapCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4331, 4339); } /// Error code: 2002-4332; Inner value: 0x21d802 - public static Result.Base InvalidRemapStorageMapEntryCount => new Result.Base(ModuleFs, 4332); + public static Result.Base InvalidMapEntryCount => new Result.Base(ModuleFs, 4332); /// Error code: 2002-4333; Inner value: 0x21da02 - public static Result.Base InvalidRemapStorageOffset => new Result.Base(ModuleFs, 4333); + public static Result.Base InvalidMapOffset => new Result.Base(ModuleFs, 4333); /// Error code: 2002-4334; Inner value: 0x21dc02 - public static Result.Base InvalidRemapStorageSize => new Result.Base(ModuleFs, 4334); + public static Result.Base InvalidMapSize => new Result.Base(ModuleFs, 4334); /// Error code: 2002-4335; Inner value: 0x21de02 - public static Result.Base InvalidRemapStorageAlignment => new Result.Base(ModuleFs, 4335); + public static Result.Base InvalidMapAlignment => new Result.Base(ModuleFs, 4335); /// Error code: 2002-4336; Inner value: 0x21e002 - public static Result.Base InvalidRemapStorageStorageType => new Result.Base(ModuleFs, 4336); + public static Result.Base InvalidMapStorageType => new Result.Base(ModuleFs, 4336); /// The range of the new map entry overlaps with the range of an existing map entry.
Error code: 2002-4337; Inner value: 0x21e202
- public static Result.Base InvalidRemapStorageNewMapEntryOffset => new Result.Base(ModuleFs, 4337); + public static Result.Base MapAddressAlreadyRegistered => new Result.Base(ModuleFs, 4337); /// The storage for the map entry's storage type hasn't been registered.
Error code: 2002-4338; Inner value: 0x21e402
- public static Result.Base RemapStorageStorageNotRegistered => new Result.Base(ModuleFs, 4338); + public static Result.Base MapStorageNotFound => new Result.Base(ModuleFs, 4338); /// The storage registered for the map entry's storage type is too short to contain the physical range specified in the map entry.
Error code: 2002-4339; Inner value: 0x21e602
- public static Result.Base RemapStorageInvalidRegisteredStorageSize => new Result.Base(ModuleFs, 4339); + public static Result.Base InvalidMapStorageSize => new Result.Base(ModuleFs, 4339); /// Error code: 2002-4341; Range: 4341-4349; Inner value: 0x21ea02 - public static Result.Base UnionStorageCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4341, 4349); } + public static Result.Base SaveDataLogCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4341, 4349); } /// Error code: 2002-4342; Inner value: 0x21ec02 - public static Result.Base InvalidUnionStorageBlockSize => new Result.Base(ModuleFs, 4342); + public static Result.Base InvalidLogBlockSize => new Result.Base(ModuleFs, 4342); /// Error code: 2002-4343; Inner value: 0x21ee02 - public static Result.Base InvalidUnionStorageLogOffsetAlignment => new Result.Base(ModuleFs, 4343); + public static Result.Base InvalidLogOffset => new Result.Base(ModuleFs, 4343); /// Error code: 2002-4344; Inner value: 0x21f002 - public static Result.Base InvalidUnionStorageLogOffsetForCommit => new Result.Base(ModuleFs, 4344); + public static Result.Base UnexpectedEndOfLog => new Result.Base(ModuleFs, 4344); /// Error code: 2002-4345; Inner value: 0x21f202 - public static Result.Base InvalidUnionStorageLogOffset => new Result.Base(ModuleFs, 4345); + public static Result.Base LogNotFound => new Result.Base(ModuleFs, 4345); /// Error code: 2002-4352; Inner value: 0x220002 - public static Result.Base InvalidSaveDataThumbnailHash => new Result.Base(ModuleFs, 4352); + public static Result.Base ThumbnailHashVerificationFailed => new Result.Base(ModuleFs, 4352); /// Error code: 2002-4357; Inner value: 0x220a02 public static Result.Base InvalidSaveDataInternalStorageIntegritySeedSize => new Result.Base(ModuleFs, 4357); /// Error code: 2002-4358; Inner value: 0x220c02 @@ -1208,7 +1208,7 @@ namespace LibHac.Fs public static Result.Base UnclearedSaveDataRealDataVerificationFailed => new Result.Base(ModuleFs, 4373); /// Error code: 2002-4402; Inner value: 0x226402 - public static Result.Base SaveDataInvalidGptPartitionSignature => new Result.Base(ModuleFs, 4402); + public static Result.Base SaveDataGptHeaderSignatureVerificationFailed => new Result.Base(ModuleFs, 4402); /// Error code: 2002-4411; Range: 4411-4419; Inner value: 0x227602 public static Result.Base SaveDataCoreFileSystemCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4411, 4419); } @@ -1252,7 +1252,7 @@ namespace LibHac.Fs /// Error code: 2002-4461; Range: 4461-4479; Inner value: 0x22da02 public static Result.Base SaveDataDatabaseCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4461, 4479); } /// Error code: 2002-4462; Inner value: 0x22dc02 - public static Result.Base SaveDataAllocationTableCorrupted => new Result.Base(ModuleFs, 4462); + public static Result.Base InvalidSaveDataAllocationTableBlock => new Result.Base(ModuleFs, 4462); /// Error code: 2002-4463; Inner value: 0x22de02 public static Result.Base InvalidSaveDataKeyValueListElementIndex => new Result.Base(ModuleFs, 4463); /// Error code: 2002-4464; Inner value: 0x22e002 @@ -1267,28 +1267,28 @@ namespace LibHac.Fs public static Result.Base InvalidSaveDataBitmapIndex => new Result.Base(ModuleFs, 4468); /// Error code: 2002-4481; Range: 4481-4489; Inner value: 0x230202 - public static Result.Base SaveDataExtenderCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4481, 4489); } + public static Result.Base SaveDataExtensionContextCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4481, 4489); } /// Error code: 2002-4482; Inner value: 0x230402 - public static Result.Base IncorrectSaveDataExtensionContextMagic => new Result.Base(ModuleFs, 4482); + public static Result.Base IncorrectSaveDataExtensionContextMagicCode => new Result.Base(ModuleFs, 4482); /// Error code: 2002-4483; Inner value: 0x230602 public static Result.Base InvalidSaveDataExtensionContextState => new Result.Base(ModuleFs, 4483); /// The extension context doesn't match the current save data.
Error code: 2002-4484; Inner value: 0x230802
- public static Result.Base SaveDataExtensionContextMismatch => new Result.Base(ModuleFs, 4484); + public static Result.Base DifferentSaveDataExtensionContextParameter => new Result.Base(ModuleFs, 4484); /// Error code: 2002-4485; Inner value: 0x230a02 - public static Result.Base InvalidSaveDataExtenderSize => new Result.Base(ModuleFs, 4485); + public static Result.Base InvalidSaveDataExtensionContextParameter => new Result.Base(ModuleFs, 4485); /// Error code: 2002-4491; Range: 4491-4499; Inner value: 0x231602 public static Result.Base IntegritySaveDataCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4491, 4499); } /// Error code: 2002-4492; Inner value: 0x231802 - public static Result.Base InvalidIntegritySaveDataMasterDataSize => new Result.Base(ModuleFs, 4492); + public static Result.Base InvalidIntegritySaveDataHashSize => new Result.Base(ModuleFs, 4492); /// Error code: 2002-4494; Inner value: 0x231c02 - public static Result.Base InvalidIntegritySaveDataStorageSize => new Result.Base(ModuleFs, 4494); + public static Result.Base InvalidIntegritySaveDataControlAreaSize => new Result.Base(ModuleFs, 4494); /// Error code: 2002-4495; Inner value: 0x231e02 - public static Result.Base InvalidIntegritySaveDataMasterHeader => new Result.Base(ModuleFs, 4495); + public static Result.Base IntegritySaveDataControlAreaVerificationFailed => new Result.Base(ModuleFs, 4495); /// Error code: 2002-4496; Inner value: 0x232002 - public static Result.Base InvalidIntegritySaveDataSignature => new Result.Base(ModuleFs, 4496); + public static Result.Base IntegritySaveDataMasterSignatureVerificationFailed => new Result.Base(ModuleFs, 4496); /// Error code: 2002-4497; Inner value: 0x232202 - public static Result.Base IncorrectIntegritySaveDataLayoutHeaderMagic => new Result.Base(ModuleFs, 4497); + public static Result.Base IncorrectIntegritySaveDataMagicCode => new Result.Base(ModuleFs, 4497); /// Error code: 2002-4501; Range: 4501-4599; Inner value: 0x232a02 public static Result.Base NcaCorrupted { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 4501, 4599); } @@ -1871,15 +1871,15 @@ namespace LibHac.Fs /// Error code: 2002-6600; Range: 6600-6699; Inner value: 0x339002 public static Result.Base NotFound { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 6600, 6699); } /// Error code: 2002-6602; Inner value: 0x339402 - public static Result.Base SaveDataFileNotFound => new Result.Base(ModuleFs, 6602); + public static Result.Base FileNotFound => new Result.Base(ModuleFs, 6602); /// Error code: 2002-6603; Inner value: 0x339602 - public static Result.Base SaveDataDirectoryNotFound => new Result.Base(ModuleFs, 6603); + public static Result.Base DirectoryNotFound => new Result.Base(ModuleFs, 6603); /// Error code: 2002-6604; Inner value: 0x339802 - public static Result.Base SaveDataFileTableEntryNotFound => new Result.Base(ModuleFs, 6604); + public static Result.Base DatabaseKeyNotFound => new Result.Base(ModuleFs, 6604); /// Specified program is not found in the program registry.
Error code: 2002-6605; Inner value: 0x339a02
- public static Result.Base TargetProgramNotFound => new Result.Base(ModuleFs, 6605); + public static Result.Base ProgramInfoNotFound => new Result.Base(ModuleFs, 6605); /// Specified program index is not found
Error code: 2002-6606; Inner value: 0x339c02
- public static Result.Base TargetProgramIndexNotFound => new Result.Base(ModuleFs, 6606); + public static Result.Base ProgramIndexNotFound => new Result.Base(ModuleFs, 6606); /// Error code: 2002-6700; Range: 6700-6799; Inner value: 0x345802 public static Result.Base OutOfResource { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => new Result.Base(ModuleFs, 6700, 6799); } @@ -1888,7 +1888,7 @@ namespace LibHac.Fs /// Error code: 2002-6706; Inner value: 0x346402 public static Result.Base MappingTableFull => new Result.Base(ModuleFs, 6706); /// Error code: 2002-6707; Inner value: 0x346602 - public static Result.Base AllocationTableInsufficientFreeBlocks => new Result.Base(ModuleFs, 6707); + public static Result.Base AllocationTableFull => new Result.Base(ModuleFs, 6707); /// Error code: 2002-6709; Inner value: 0x346a02 public static Result.Base OpenCountLimit => new Result.Base(ModuleFs, 6709); /// The maximum number of file systems have been added to the multi-commit manager.
Error code: 2002-6710; Inner value: 0x346c02
@@ -1910,7 +1910,7 @@ namespace LibHac.Fs /// Error code: 2002-6905; Inner value: 0x35f202 public static Result.Base NotMounted => new Result.Base(ModuleFs, 6905); /// Error code: 2002-6906; Inner value: 0x35f402 - public static Result.Base SaveDataIsExtending => new Result.Base(ModuleFs, 6906); + public static Result.Base SaveDataExtending => new Result.Base(ModuleFs, 6906); /// Error code: 2002-6907; Inner value: 0x35f602 public static Result.Base SaveDataToExpandIsProvisionallyCommitted => new Result.Base(ModuleFs, 6907); diff --git a/src/LibHac/FsSrv/Impl/ProgramRegistryManager.cs b/src/LibHac/FsSrv/Impl/ProgramRegistryManager.cs index f872c83d..2e4806e6 100644 --- a/src/LibHac/FsSrv/Impl/ProgramRegistryManager.cs +++ b/src/LibHac/FsSrv/Impl/ProgramRegistryManager.cs @@ -100,7 +100,7 @@ namespace LibHac.FsSrv.Impl /// associated with the specified process ID. /// The process ID of the to get. /// : The operation was successful.
- /// : The was not found.
+ /// : The was not found. public Result GetProgramInfo(out ProgramInfo programInfo, ulong processId) { lock (ProgramInfoList) @@ -121,7 +121,7 @@ namespace LibHac.FsSrv.Impl } UnsafeHelpers.SkipParamInit(out programInfo); - return ResultFs.TargetProgramNotFound.Log(); + return ResultFs.ProgramInfoNotFound.Log(); } } @@ -132,7 +132,7 @@ namespace LibHac.FsSrv.Impl /// associated with the specified program ID. /// The program ID of the to get. /// : The operation was successful.
- /// : The was not found.
+ /// : The was not found. public Result GetProgramInfoByProgramId(out ProgramInfo programInfo, ulong programId) { lock (ProgramInfoList) @@ -147,7 +147,7 @@ namespace LibHac.FsSrv.Impl } UnsafeHelpers.SkipParamInit(out programInfo); - return ResultFs.TargetProgramNotFound.Log(); + return ResultFs.ProgramInfoNotFound.Log(); } } } diff --git a/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs b/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs index 09700b91..a08c4963 100644 --- a/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs +++ b/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs @@ -822,7 +822,7 @@ namespace LibHac.FsSrv ProgramId mainProgramId = _config.ProgramRegistryService.GetProgramIdByIndex(programId, programIndex); if (mainProgramId == ProgramId.InvalidId) - return ResultFs.TargetProgramIndexNotFound.Log(); + return ResultFs.ProgramIndexNotFound.Log(); targetProgramId = mainProgramId; return Result.Success; diff --git a/src/LibHac/FsSrv/ProgramIndexRegistryService.cs b/src/LibHac/FsSrv/ProgramIndexRegistryService.cs index 792b58b6..fc800000 100644 --- a/src/LibHac/FsSrv/ProgramIndexRegistryService.cs +++ b/src/LibHac/FsSrv/ProgramIndexRegistryService.cs @@ -69,7 +69,7 @@ namespace LibHac.FsSrv /// When this method returns successfully, contains the /// number of programs in the current application. /// : The operation was successful.
- /// : The calling program was not found + /// : The calling program was not found /// in the program registry. Something's wrong with Loader if this happens.
public Result GetProgramIndex(out int programIndex, out int programCount) { diff --git a/src/LibHac/FsSrv/SaveDataFileSystemService.cs b/src/LibHac/FsSrv/SaveDataFileSystemService.cs index 75e5de4b..86d96631 100644 --- a/src/LibHac/FsSrv/SaveDataFileSystemService.cs +++ b/src/LibHac/FsSrv/SaveDataFileSystemService.cs @@ -679,7 +679,7 @@ namespace LibHac.FsSrv if (rc.IsFailure()) { - if (ResultFs.SaveDataPathAlreadyExists.Includes(rc)) + if (ResultFs.AlreadyExists.Includes(rc)) { return ResultFs.PathAlreadyExists.LogConverted(rc); } @@ -958,7 +958,7 @@ namespace LibHac.FsSrv return ResultFs.TargetNotFound.Log(); if (indexerValue.State == SaveDataState.Extending) - return ResultFs.SaveDataIsExtending.Log(); + return ResultFs.SaveDataExtending.Log(); tempSaveDataId = indexerValue.SaveDataId; } diff --git a/src/LibHac/FsSrv/SaveDataIndexer.cs b/src/LibHac/FsSrv/SaveDataIndexer.cs index 69052dff..4b23e3af 100644 --- a/src/LibHac/FsSrv/SaveDataIndexer.cs +++ b/src/LibHac/FsSrv/SaveDataIndexer.cs @@ -235,7 +235,7 @@ namespace LibHac.FsSrv if (rc.IsSuccess()) { - return ResultFs.SaveDataPathAlreadyExists.Log(); + return ResultFs.AlreadyExists.Log(); } _lastPublishedId++; @@ -298,7 +298,7 @@ namespace LibHac.FsSrv { if (iterator.GetValue().SaveDataId == key.StaticSaveDataId) { - return ResultFs.SaveDataPathAlreadyExists.Log(); + return ResultFs.AlreadyExists.Log(); } iterator.Next(); diff --git a/src/LibHac/FsSrv/SaveDataIndexerLite.cs b/src/LibHac/FsSrv/SaveDataIndexerLite.cs index a67af87b..d4866d31 100644 --- a/src/LibHac/FsSrv/SaveDataIndexerLite.cs +++ b/src/LibHac/FsSrv/SaveDataIndexerLite.cs @@ -53,7 +53,7 @@ namespace LibHac.FsSrv lock (Locker) { if (IsKeyValueSet && _key == key) - return ResultFs.SaveDataPathAlreadyExists.Log(); + return ResultFs.AlreadyExists.Log(); _key = key; IsKeyValueSet = true; @@ -87,7 +87,7 @@ namespace LibHac.FsSrv lock (Locker) { if (IsKeyValueSet && _key == key) - return ResultFs.SaveDataPathAlreadyExists.Log(); + return ResultFs.AlreadyExists.Log(); _key = key; IsKeyValueSet = true; diff --git a/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs b/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs index 18e3e47c..ed228226 100644 --- a/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs +++ b/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs @@ -134,7 +134,7 @@ namespace LibHac.FsSystem.RomFs if (ResultFs.InvalidOffset.Includes(result)) return ResultFs.OutOfRange.LogConverted(result); - if (ResultFs.SaveDataFileNotFound.Includes(result) || + if (ResultFs.FileNotFound.Includes(result) || ResultFs.IncompatiblePath.Includes(result)) { return ResultFs.PathNotFound.LogConverted(result); @@ -214,7 +214,7 @@ namespace LibHac.FsSystem.RomFs return ResultFs.IncorrectRomIntegrityVerificationMagic.LogConverted(result); if (ResultFs.InvalidZeroHash.Includes(result)) - return ResultFs.InvalidRomZeroHash.LogConverted(result); + return ResultFs.InvalidRomZeroSignature.LogConverted(result); if (ResultFs.NonRealDataVerificationFailed.Includes(result)) return ResultFs.RomNonRealDataVerificationFailed.LogConverted(result); diff --git a/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs b/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs index cbc9dae5..01d2e10a 100644 --- a/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs +++ b/src/LibHac/FsSystem/Save/SaveDataFileSystem.cs @@ -50,7 +50,7 @@ namespace LibHac.FsSystem.Save } else { - ThrowHelper.ThrowResult(ResultFs.InvalidJournalIntegritySaveDataMasterHeader.Value, "Savedata header is not valid."); + ThrowHelper.ThrowResult(ResultFs.JournalIntegritySaveDataControlAreaVerificationFailed.Value, "Savedata header is not valid."); } Header = IsFirstHeaderInUse ? headerA : headerB; diff --git a/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs b/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs index bf6c18bc..b6110e81 100644 --- a/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs +++ b/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs @@ -63,7 +63,7 @@ namespace LibHac.FsSystem.Save if (startBlock == -1) { - return ResultFs.AllocationTableInsufficientFreeBlocks.Log(); + return ResultFs.AllocationTableFull.Log(); } var fileEntry = new SaveFileInfo { StartBlock = startBlock, Length = size }; diff --git a/src/LibHac/FsSystem/Save/SaveResults.cs b/src/LibHac/FsSystem/Save/SaveResults.cs index 5fc362a3..303badb4 100644 --- a/src/LibHac/FsSystem/Save/SaveResults.cs +++ b/src/LibHac/FsSystem/Save/SaveResults.cs @@ -20,7 +20,7 @@ namespace LibHac.FsSystem.Save if (ResultFs.UnsupportedVersion.Includes(result)) { - return ResultFs.UnsupportedSaveVersion.Value; + return ResultFs.UnsupportedSaveDataVersion.Value; } if (ResultFs.IntegrityVerificationStorageCorrupted.Includes(result)) @@ -57,7 +57,7 @@ namespace LibHac.FsSystem.Save { if (ResultFs.InvalidGptPartitionSignature.Includes(result)) { - return ResultFs.SaveDataInvalidGptPartitionSignature.Value; + return ResultFs.SaveDataGptHeaderSignatureVerificationFailed.Value; } return result; @@ -103,7 +103,7 @@ namespace LibHac.FsSystem.Save return ResultFs.PathNotFound.Value; } - if (ResultFs.SaveDataPathAlreadyExists.Includes(result)) + if (ResultFs.AlreadyExists.Includes(result)) { return ResultFs.PathAlreadyExists.Value; } @@ -118,7 +118,7 @@ namespace LibHac.FsSystem.Save return ResultFs.OutOfRange.Value; } - if (ResultFs.AllocationTableInsufficientFreeBlocks.Includes(result)) + if (ResultFs.AllocationTableFull.Includes(result)) { return ResultFs.UsableSpaceNotEnough.Value; }