From 80d52dd499a74cbc73cfc263f215ec1398df57e8 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Wed, 9 Nov 2022 22:14:07 -0700 Subject: [PATCH] Do some code formatting in LibHac --- src/LibHac/ApplicationId.cs | 2 +- src/LibHac/Arp/ArpClient.cs | 2 +- src/LibHac/Arp/Impl/IReader.cs | 2 +- src/LibHac/Bcat/BcatServer.cs | 2 +- src/LibHac/Bcat/BcatServiceType.cs | 2 +- src/LibHac/Bcat/Impl/Ipc/BcatServiceObject.cs | 2 +- .../Impl/Ipc/IDeliveryCacheDirectoryService.cs | 2 +- .../Bcat/Impl/Ipc/IDeliveryCacheFileService.cs | 2 +- .../Impl/Ipc/IDeliveryCacheStorageService.cs | 2 +- src/LibHac/Bcat/Impl/Ipc/IServiceCreator.cs | 2 +- src/LibHac/Bcat/Impl/Service/AccessControl.cs | 2 +- .../Core/DeliveryCacheDirectoryMetaAccessor.cs | 2 +- .../Impl/Service/DeliveryCacheFileService.cs | 2 +- src/LibHac/Bcat/Impl/Service/ServiceCreator.cs | 2 +- src/LibHac/Bcat/ResultBcat.cs | 2 +- src/LibHac/Boot/KeyBlob.cs | 1 + src/LibHac/Boot/Package2.cs | 10 +++++----- src/LibHac/Common/BlitSpan.cs | 2 +- src/LibHac/Common/BlitStruct.cs | 2 +- src/LibHac/Common/HResult.cs | 2 +- src/LibHac/Common/InitializationGuard.cs | 2 +- src/LibHac/Common/InteropWin32.cs | 2 +- src/LibHac/Common/Keys/DefaultKeySet.cs | 1 - src/LibHac/Common/Keys/ExternalKeyReader.cs | 3 +-- src/LibHac/Common/Keys/ExternalKeyWriter.cs | 4 ++-- src/LibHac/Common/Keys/KeyDerivation.cs | 2 +- src/LibHac/Common/Keys/KeyInfo.cs | 2 +- src/LibHac/Common/Keys/MissingKeyException.cs | 12 +++--------- src/LibHac/Common/LibHacException.cs | 12 +++--------- src/LibHac/Common/NonCopyableAttribute.cs | 2 +- src/LibHac/Common/ProgressBar.cs | 1 + src/LibHac/Common/Ref.cs | 10 +++------- src/LibHac/Common/RentedArray.cs | 2 +- src/LibHac/Common/SharedObjectHelpers.cs | 2 +- src/LibHac/Common/SharedRef.cs | 2 +- src/LibHac/Common/SpanHelpers.cs | 2 +- src/LibHac/Common/U8StringHelpers.cs | 2 +- src/LibHac/Common/UnsafeHelpers.cs | 2 +- src/LibHac/Common/Utilities.cs | 1 + src/LibHac/Crypto/CryptoUtil.cs | 2 +- src/LibHac/Crypto/IHash.cs | 2 +- src/LibHac/Crypto/Impl/HashState.cs | 2 +- src/LibHac/Crypto/Impl/Sha256Impl.cs | 2 +- src/LibHac/Crypto/Rsa.cs | 5 ++--- src/LibHac/Crypto/Sha256.cs | 2 +- src/LibHac/Crypto/Sha256Generator.cs | 2 +- src/LibHac/Diag/DiagClient.cs | 2 +- src/LibHac/Diag/Impl/ObserverManager.cs | 2 +- src/LibHac/Diag/Log.cs | 2 +- src/LibHac/Diag/LogObserver.cs | 2 +- src/LibHac/Diag/LogTypes.cs | 2 +- src/LibHac/Fat/FatAttribute.cs | 2 +- src/LibHac/Fat/FatFormatParam.cs | 2 +- src/LibHac/Fs/AccessLog.cs | 1 - src/LibHac/Fs/AccessLogHelpers.cs | 2 +- src/LibHac/Fs/Buffers/IBufferManager.cs | 1 - src/LibHac/Fs/Common/Path.cs | 8 ++++---- src/LibHac/Fs/CommonPaths.cs | 4 ++-- src/LibHac/Fs/DirectoryEntry.cs | 1 + src/LibHac/Fs/DirectoryHandle.cs | 2 +- src/LibHac/Fs/FileHandle.cs | 2 +- src/LibHac/Fs/FileOptions.cs | 2 +- src/LibHac/Fs/FsContext.cs | 2 +- src/LibHac/Fs/FsEnums.cs | 1 - src/LibHac/Fs/Fsa/FileSystemAccessor.cs | 3 ++- src/LibHac/Fs/Fsa/IAttributeFileSystem.cs | 2 +- src/LibHac/Fs/Fsa/IMultiCommitTarget.cs | 2 +- src/LibHac/Fs/GameCard.cs | 1 - src/LibHac/Fs/Host.cs | 2 +- src/LibHac/Fs/Impl/FileRegion.cs | 2 +- src/LibHac/Fs/Impl/ReaderWriterLockHandlers.cs | 2 +- src/LibHac/Fs/Impl/SdHandleManager.cs | 2 +- src/LibHac/Fs/PathTool.cs | 2 +- src/LibHac/Fs/ResultHandlingUtility.cs | 2 +- src/LibHac/Fs/ScopedSetter.cs | 2 +- src/LibHac/Fs/Shim/BaseFileSystem.cs | 1 - src/LibHac/Fs/Shim/BcatSaveData.cs | 1 - src/LibHac/Fs/Shim/DeviceSaveData.cs | 1 - .../Fs/Shim/FileSystemProxyServiceObject.cs | 2 +- .../Fs/Shim/FileSystemServiceObjectAdapter.cs | 1 - src/LibHac/Fs/Shim/GameCard.cs | 2 -- src/LibHac/Fs/Shim/ImageDirectory.cs | 1 - src/LibHac/Fs/Shim/Logo.cs | 1 - src/LibHac/Fs/Shim/Priority.cs | 2 +- src/LibHac/Fs/Shim/SaveDataForDebug.cs | 1 - src/LibHac/Fs/Shim/SaveDataManagement.cs | 1 - src/LibHac/Fs/Shim/SaveDataTransferVersion2.cs | 1 - src/LibHac/Fs/Shim/SystemSaveData.cs | 1 - src/LibHac/Fs/StringTraits.cs | 2 +- src/LibHac/Fs/UserId.cs | 2 +- .../FsSrv/AccessFailureManagementService.cs | 2 +- .../FsSrv/AccessFailureManagementServiceImpl.cs | 2 +- src/LibHac/FsSrv/AccessLogService.cs | 10 +++++----- src/LibHac/FsSrv/AccessLogServiceImpl.cs | 2 +- src/LibHac/FsSrv/BaseFileSystemService.cs | 2 +- src/LibHac/FsSrv/BaseFileSystemServiceImpl.cs | 2 +- src/LibHac/FsSrv/BaseStorageService.cs | 2 +- src/LibHac/FsSrv/EmulatedGameCard.cs | 1 + src/LibHac/FsSrv/EmulatedSdCard.cs | 2 +- src/LibHac/FsSrv/ExternalKeySet.cs | 2 +- .../FsCreator/EmulatedBisFileSystemCreator.cs | 1 - .../EmulatedBisFileSystemCreatorConfig.cs | 2 +- .../FsCreator/EmulatedSdCardFileSystemCreator.cs | 1 - .../FsCreator/FileSystemCreatorInterfaces.cs | 2 +- .../FsSrv/FsCreator/IBuiltInStorageCreator.cs | 2 +- .../IBuiltInStorageFileSystemCreator.cs | 2 +- .../FsCreator/IEncryptedFileSystemCreator.cs | 2 +- .../FsSrv/FsCreator/IFatFileSystemCreator.cs | 2 +- .../FsCreator/IGameCardFileSystemCreator.cs | 2 +- .../FsSrv/FsCreator/IGameCardStorageCreator.cs | 2 +- .../FsSrv/FsCreator/IMemoryStorageCreator.cs | 2 +- .../FsCreator/IPartitionFileSystemCreator.cs | 2 +- .../FsSrv/FsCreator/IRomFileSystemCreator.cs | 2 +- .../FsCreator/ISdCardProxyFileSystemCreator.cs | 2 +- src/LibHac/FsSrv/FsCreator/ISdStorageCreator.cs | 2 +- .../FsCreator/ISubDirectoryFileSystemCreator.cs | 2 +- .../FsCreator/ITargetManagerFileSystemCreator.cs | 2 +- .../FsCreator/PartitionFileSystemCreator.cs | 2 +- .../FsSrv/FsCreator/SaveDataFileSystemCreator.cs | 1 - .../FsCreator/SubDirectoryFileSystemCreator.cs | 2 +- .../FsCreator/TargetManagerFileSystemCreator.cs | 2 +- src/LibHac/FsSrv/GameCardInfo.cs | 2 +- src/LibHac/FsSrv/IDeviceHandleManager.cs | 2 +- src/LibHac/FsSrv/ISaveDataIndexer.cs | 2 +- src/LibHac/FsSrv/ISaveDataIndexerManager.cs | 2 +- src/LibHac/FsSrv/IStackUsageReporter.cs | 2 +- .../Impl/AccessFailureDetectionEventManager.cs | 2 +- .../FsSrv/Impl/AsynchronousAccessFileSystem.cs | 2 +- src/LibHac/FsSrv/Impl/BisWiper.cs | 2 +- src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs | 2 +- .../FsSrv/Impl/FileSystemInterfaceAdapter.cs | 1 - src/LibHac/FsSrv/Impl/IDeviceEventSimulator.cs | 2 +- .../Impl/IEntryOpenCountSemaphoreManager.cs | 2 +- .../Impl/IRomFileSystemAccessFailureManager.cs | 2 +- .../Impl/ISaveDataMultiCommitCoreInterface.cs | 2 +- src/LibHac/FsSrv/Impl/OpenCountFileSystem.cs | 2 +- .../FsSrv/Impl/ProgramIndexMapInfoManager.cs | 1 - src/LibHac/FsSrv/Impl/Utility.cs | 2 +- src/LibHac/FsSrv/MemoryReport.cs | 2 +- src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs | 4 ++-- src/LibHac/FsSrv/SaveDataFileSystemService.cs | 8 +++----- src/LibHac/FsSrv/SaveDataIndexer.cs | 5 ++--- src/LibHac/FsSrv/SaveDataIndexerManager.cs | 16 ++++++++-------- src/LibHac/FsSrv/SaveDataInfoReaderImpl.cs | 2 +- src/LibHac/FsSrv/SaveDataSharedFileStorage.cs | 1 - src/LibHac/FsSrv/Sf/IDirectory.cs | 2 +- src/LibHac/FsSrv/Sf/IEventNotifier.cs | 2 +- src/LibHac/FsSrv/Sf/IFile.cs | 2 +- src/LibHac/FsSrv/Sf/IFileSystem.cs | 2 +- src/LibHac/FsSrv/Sf/IFileSystemProxyForLoader.cs | 2 +- src/LibHac/FsSrv/Sf/IMultiCommitManager.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataChunkExporter.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataChunkImporter.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataChunkIterator.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataDivisionExporter.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataDivisionImporter.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataExporter.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataImporter.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataInfoReader.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataMover.cs | 2 +- src/LibHac/FsSrv/Sf/ISaveDataTransferManager.cs | 2 +- .../Sf/ISaveDataTransferManagerForRepair.cs | 2 +- .../ISaveDataTransferManagerForSaveDataRepair.cs | 2 +- .../Sf/ISaveDataTransferManagerWithDivision.cs | 2 +- .../FsSrv/Sf/ISaveDataTransferProhibiter.cs | 2 +- src/LibHac/FsSrv/Sf/IStorage.cs | 2 +- src/LibHac/FsSrv/Sf/IWiper.cs | 2 +- .../Storage/IStorageDeviceManagerFactory.cs | 2 +- .../FsSrv/Storage/Sf/IStorageDeviceManager.cs | 2 +- .../FsSrv/Storage/Sf/IStorageDeviceOperator.cs | 2 +- .../FsSrv/Storage/StorageDeviceManagerFactory.cs | 2 +- src/LibHac/FsSrv/Storage/StorageDevicePortId.cs | 2 +- src/LibHac/FsSystem/BucketTreeBuilder.cs | 2 +- src/LibHac/FsSystem/BufferedStorage.cs | 3 +-- .../FsSystem/Buffers/BufferManagerUtility.cs | 2 +- .../FsSystem/Buffers/FileSystemBuddyHeap.cs | 2 +- .../FsSystem/Buffers/FileSystemBufferManager.cs | 1 - src/LibHac/FsSystem/CompressedStorage.cs | 2 -- src/LibHac/FsSystem/IUniqueLock.cs | 2 +- .../FsSystem/Impl/PartitionFileSystemFormats.cs | 2 +- .../FsSystem/Impl/TargetLockedAvoidance.cs | 2 +- src/LibHac/FsSystem/NcaReader.cs | 2 +- src/LibHac/FsSystem/PartitionFile.cs | 2 +- .../FsSystem/PartitionFileSystemMetaCore.cs | 2 +- src/LibHac/FsSystem/ReadOnlyBlockCacheStorage.cs | 1 - src/LibHac/FsSystem/SemaphoreAdapter.cs | 2 +- src/LibHac/FsSystem/ThreadPriorityChanger.cs | 2 +- src/LibHac/FsSystem/ValueStringBuilder.cs | 5 ++++- src/LibHac/GcSrv/IGameCardDeviceManager.cs | 2 +- src/LibHac/GcSrv/IGameCardKeyManager.cs | 2 +- src/LibHac/HorizonClient.cs | 2 +- src/LibHac/HorizonConfiguration.cs | 2 +- src/LibHac/Kernel/IniExtract.cs | 2 +- src/LibHac/Kernel/KipReader.cs | 3 ++- src/LibHac/Kvdb/AutoBuffer.cs | 2 +- src/LibHac/Kvdb/BoundedString.cs | 2 +- src/LibHac/Kvdb/FlatMapKeyValueStore.cs | 6 +++--- src/LibHac/Kvdb/KeyValueArchive.cs | 2 +- src/LibHac/Loader/MetaLoader.cs | 2 +- src/LibHac/Loader/Types.cs | 1 + src/LibHac/Lr/AddOnContentLocationResolver.cs | 2 +- src/LibHac/Lr/IAddOnContentLocationResolver.cs | 2 +- src/LibHac/Lr/ILocationResolver.cs | 2 +- src/LibHac/Lr/ILocationResolverManager.cs | 2 +- src/LibHac/Lr/IRegisteredLocationResolver.cs | 2 +- src/LibHac/Lr/LocationResolver.cs | 2 +- src/LibHac/Lr/LrClient.cs | 2 +- src/LibHac/Lr/LrService.cs | 2 +- src/LibHac/Lr/RegisteredLocationResolver.cs | 4 ++-- src/LibHac/MemoryResource.cs | 2 +- src/LibHac/Ncm/ContentMetaId.cs | 2 +- src/LibHac/Ncm/ContentMetaKey.cs | 2 +- src/LibHac/Ncm/ContentMetaStructs.cs | 2 +- src/LibHac/Ncm/DataId.cs | 2 +- src/LibHac/Ncm/IContentMetaDatabase.cs | 2 +- src/LibHac/Ncm/IContentStorage.cs | 2 +- src/LibHac/Ncm/ProgramId.cs | 2 +- src/LibHac/Ncm/ProgramLocation.cs | 2 +- src/LibHac/Ncm/StorageId.cs | 2 +- src/LibHac/Ncm/SystemContentMetaId.cs | 2 +- src/LibHac/Os/ConditionVariable.cs | 2 +- src/LibHac/Os/ILockable.cs | 2 +- src/LibHac/Os/ITickGenerator.cs | 2 +- src/LibHac/Os/Impl/MultipleWaitImpl.cs | 1 + src/LibHac/Os/Impl/OsResourceManager.cs | 2 +- .../Os/Impl/ReaderWriterLockImpl-os.net.cs | 2 +- src/LibHac/Os/Impl/ReaderWriterLockImpl.cs | 2 +- src/LibHac/Os/Impl/TickManager-os.net.cs | 2 +- src/LibHac/Os/Impl/TickManager.cs | 4 ++-- src/LibHac/Os/Impl/TimeoutHelper-os.net.cs | 2 +- src/LibHac/Os/Impl/TimeoutHelper.cs | 2 +- src/LibHac/Os/NativeHandle.cs | 2 +- src/LibHac/Os/ProcessId.cs | 2 +- src/LibHac/Os/ReaderWriterLock.cs | 1 - src/LibHac/Os/ReaderWriterLockTypes.cs | 2 +- src/LibHac/Os/ScopedLock.cs | 2 +- src/LibHac/Os/Thread.cs | 2 +- src/LibHac/Os/Tick.cs | 2 +- src/LibHac/Os/UniqueLock.cs | 2 +- src/LibHac/SdmmcSrv/ISdmmcDeviceManager.cs | 2 +- src/LibHac/Sf/Buffers.cs | 2 +- src/LibHac/Sf/NativeHandle.cs | 2 +- src/LibHac/Sm/IServiceObject.cs | 2 +- src/LibHac/Sm/ServiceManager.cs | 2 +- src/LibHac/Sm/ServiceManagerClient.cs | 2 +- src/LibHac/Svc/Handle.cs | 2 +- src/LibHac/Time/PosixTime.cs | 2 +- src/LibHac/TimeSpan.cs | 2 +- src/LibHac/Tools/Fs/InMemoryFileSystem.cs | 8 ++++---- src/LibHac/Tools/Fs/SwitchFs.cs | 4 +++- .../HierarchicalIntegrityVerificationStorage.cs | 14 +++++++------- src/LibHac/Tools/FsSystem/LayeredFileSystem.cs | 2 +- src/LibHac/Tools/FsSystem/PathTools.cs | 3 +-- src/LibHac/Tools/FsSystem/RomFs/HashHelpers.cs | 9 +++++++-- src/LibHac/Tools/FsSystem/Save/JournalMap.cs | 2 +- src/LibHac/Tools/README.md | 5 ++++- src/LibHac/Tools/Ro/Nro.cs | 1 - src/LibHac/Tools/Settings/Calibration.cs | 1 + src/LibHac/Util/BitUtil.cs | 2 +- src/LibHac/Util/CharacterEncoding.cs | 4 +--- src/LibHac/Util/Impl/HexConverter.cs | 6 +++--- src/LibHac/Util/Lz4.cs | 16 ++++++---------- src/LibHac/Util/Optional.cs | 2 ++ src/LibHac/Util/Overlap.cs | 2 +- src/LibHac/Util/StringUtils.cs | 1 + src/LibHac/Util/UniqueLock.cs | 2 +- src/hactoolnet/IndentingStringBuilder.cs | 6 +++--- 267 files changed, 310 insertions(+), 342 deletions(-) diff --git a/src/LibHac/ApplicationId.cs b/src/LibHac/ApplicationId.cs index 706dfe78..b1ff2cb4 100644 --- a/src/LibHac/ApplicationId.cs +++ b/src/LibHac/ApplicationId.cs @@ -19,4 +19,4 @@ public readonly struct ApplicationId : IEquatable public override bool Equals(object obj) => obj is ApplicationId id && Equals(id); public bool Equals(ApplicationId other) => Value == other.Value; public override int GetHashCode() => HashCode.Combine(Value); -} +} \ No newline at end of file diff --git a/src/LibHac/Arp/ArpClient.cs b/src/LibHac/Arp/ArpClient.cs index f01bd2bd..8edbaf18 100644 --- a/src/LibHac/Arp/ArpClient.cs +++ b/src/LibHac/Arp/ArpClient.cs @@ -71,4 +71,4 @@ public class ArpClient : IDisposable _reader.SetByMove(ref reader.Ref()); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Arp/Impl/IReader.cs b/src/LibHac/Arp/Impl/IReader.cs index b6147877..99c7c52b 100644 --- a/src/LibHac/Arp/Impl/IReader.cs +++ b/src/LibHac/Arp/Impl/IReader.cs @@ -9,4 +9,4 @@ public interface IReader : IDisposable Result GetApplicationLaunchPropertyWithApplicationId(out ApplicationLaunchProperty launchProperty, ApplicationId applicationId); Result GetApplicationControlProperty(out ApplicationControlProperty controlProperty, ulong processId); Result GetApplicationControlPropertyWithApplicationId(out ApplicationControlProperty controlProperty, ApplicationId applicationId); -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/BcatServer.cs b/src/LibHac/Bcat/BcatServer.cs index 624a7c4e..1d47556c 100644 --- a/src/LibHac/Bcat/BcatServer.cs +++ b/src/LibHac/Bcat/BcatServer.cs @@ -86,4 +86,4 @@ public class BcatServer return StorageManager; } } -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/BcatServiceType.cs b/src/LibHac/Bcat/BcatServiceType.cs index 8d040e95..7881db55 100644 --- a/src/LibHac/Bcat/BcatServiceType.cs +++ b/src/LibHac/Bcat/BcatServiceType.cs @@ -6,4 +6,4 @@ public enum BcatServiceType BcatS, BcatM, BcatA -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Ipc/BcatServiceObject.cs b/src/LibHac/Bcat/Impl/Ipc/BcatServiceObject.cs index e399bae7..5780fdc9 100644 --- a/src/LibHac/Bcat/Impl/Ipc/BcatServiceObject.cs +++ b/src/LibHac/Bcat/Impl/Ipc/BcatServiceObject.cs @@ -23,4 +23,4 @@ internal class BcatServiceObject : IServiceObject serviceObject.SetByCopy(in _serviceCreator); return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheDirectoryService.cs b/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheDirectoryService.cs index 6ba97422..a4cbaf3e 100644 --- a/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheDirectoryService.cs +++ b/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheDirectoryService.cs @@ -7,4 +7,4 @@ public interface IDeliveryCacheDirectoryService : IDisposable Result Open(ref DirectoryName name); Result Read(out int entriesRead, Span entryBuffer); Result GetCount(out int count); -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheFileService.cs b/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheFileService.cs index c8cc11bb..6903caca 100644 --- a/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheFileService.cs +++ b/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheFileService.cs @@ -8,4 +8,4 @@ public interface IDeliveryCacheFileService : IDisposable Result Read(out long bytesRead, long offset, Span destination); Result GetSize(out long size); Result GetDigest(out Digest digest); -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheStorageService.cs b/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheStorageService.cs index aa67318c..0f85eee7 100644 --- a/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheStorageService.cs +++ b/src/LibHac/Bcat/Impl/Ipc/IDeliveryCacheStorageService.cs @@ -8,4 +8,4 @@ public interface IDeliveryCacheStorageService : IDisposable Result CreateFileService(ref SharedRef outFileService); Result CreateDirectoryService(ref SharedRef outDirectoryService); Result EnumerateDeliveryCacheDirectory(out int namesRead, Span nameBuffer); -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Ipc/IServiceCreator.cs b/src/LibHac/Bcat/Impl/Ipc/IServiceCreator.cs index 6bb17193..828e1790 100644 --- a/src/LibHac/Bcat/Impl/Ipc/IServiceCreator.cs +++ b/src/LibHac/Bcat/Impl/Ipc/IServiceCreator.cs @@ -10,4 +10,4 @@ public interface IServiceCreator : IDisposable Result CreateDeliveryCacheStorageServiceWithApplicationId( ref SharedRef outService, ApplicationId applicationId); -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Service/AccessControl.cs b/src/LibHac/Bcat/Impl/Service/AccessControl.cs index fce7419e..6952241b 100644 --- a/src/LibHac/Bcat/Impl/Service/AccessControl.cs +++ b/src/LibHac/Bcat/Impl/Service/AccessControl.cs @@ -11,4 +11,4 @@ internal enum AccessControl DeliveryTaskManagement = 1 << 3, Debug = 1 << 4, All = ~0 -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Service/Core/DeliveryCacheDirectoryMetaAccessor.cs b/src/LibHac/Bcat/Impl/Service/Core/DeliveryCacheDirectoryMetaAccessor.cs index c8f5ac73..3e291cf2 100644 --- a/src/LibHac/Bcat/Impl/Service/Core/DeliveryCacheDirectoryMetaAccessor.cs +++ b/src/LibHac/Bcat/Impl/Service/Core/DeliveryCacheDirectoryMetaAccessor.cs @@ -97,4 +97,4 @@ internal class DeliveryCacheDirectoryMetaAccessor } } } -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Service/DeliveryCacheFileService.cs b/src/LibHac/Bcat/Impl/Service/DeliveryCacheFileService.cs index f6920fa3..a221b1f7 100644 --- a/src/LibHac/Bcat/Impl/Service/DeliveryCacheFileService.cs +++ b/src/LibHac/Bcat/Impl/Service/DeliveryCacheFileService.cs @@ -119,4 +119,4 @@ internal class DeliveryCacheFileService : IDeliveryCacheFileService Parent.NotifyCloseFile(); } -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/Impl/Service/ServiceCreator.cs b/src/LibHac/Bcat/Impl/Service/ServiceCreator.cs index 3fa2a452..1d3ef100 100644 --- a/src/LibHac/Bcat/Impl/Service/ServiceCreator.cs +++ b/src/LibHac/Bcat/Impl/Service/ServiceCreator.cs @@ -55,4 +55,4 @@ internal class ServiceCreator : IServiceCreator return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/Bcat/ResultBcat.cs b/src/LibHac/Bcat/ResultBcat.cs index d8823000..ce32dae9 100644 --- a/src/LibHac/Bcat/ResultBcat.cs +++ b/src/LibHac/Bcat/ResultBcat.cs @@ -51,4 +51,4 @@ public static class ResultBcat public static Result.Base InvalidDeliveryCacheStorageFile => new Result.Base(ModuleBcat, 204); /// Error code: 2122-0205; Inner value: 0x19a7a public static Result.Base StorageOpenLimitReached => new Result.Base(ModuleBcat, 205); -} +} \ No newline at end of file diff --git a/src/LibHac/Boot/KeyBlob.cs b/src/LibHac/Boot/KeyBlob.cs index 517a38a0..13394703 100644 --- a/src/LibHac/Boot/KeyBlob.cs +++ b/src/LibHac/Boot/KeyBlob.cs @@ -58,5 +58,6 @@ public struct KeyBlob [MethodImpl(MethodImplOptions.AggressiveInlining)] public static implicit operator ReadOnlySpan(in KeyBlob value) => SpanHelpers.AsReadOnlyByteSpan(in value); + public readonly override string ToString() => BytesRo.ToHexString(); } \ No newline at end of file diff --git a/src/LibHac/Boot/Package2.cs b/src/LibHac/Boot/Package2.cs index 2529cac3..699ad452 100644 --- a/src/LibHac/Boot/Package2.cs +++ b/src/LibHac/Boot/Package2.cs @@ -119,11 +119,11 @@ public struct Package2Meta // Verify that no payloads overlap. for (int i = 0; i < Package2Header.PayloadCount - 1; i++) - for (int j = i + 1; j < Package2Header.PayloadCount; j++) - { - if (Overlap.HasOverlap(PayloadOffsets[i], PayloadSizes[i], PayloadOffsets[j], PayloadSizes[j])) - return ResultLibHac.InvalidPackage2MetaPayloadsOverlap.Log(); - } + for (int j = i + 1; j < Package2Header.PayloadCount; j++) + { + if (Overlap.HasOverlap(PayloadOffsets[i], PayloadSizes[i], PayloadOffsets[j], PayloadSizes[j])) + return ResultLibHac.InvalidPackage2MetaPayloadsOverlap.Log(); + } // Check whether any payload contains the entrypoint. for (int i = 0; i < Package2Header.PayloadCount; i++) diff --git a/src/LibHac/Common/BlitSpan.cs b/src/LibHac/Common/BlitSpan.cs index a422ff83..4368a7b9 100644 --- a/src/LibHac/Common/BlitSpan.cs +++ b/src/LibHac/Common/BlitSpan.cs @@ -106,4 +106,4 @@ public ref struct BlitSpan where T : unmanaged { return Unsafe.SizeOf() * elementCount; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/BlitStruct.cs b/src/LibHac/Common/BlitStruct.cs index 297caf66..f649a50d 100644 --- a/src/LibHac/Common/BlitStruct.cs +++ b/src/LibHac/Common/BlitStruct.cs @@ -66,4 +66,4 @@ public readonly struct BlitStruct where T : unmanaged { return Unsafe.SizeOf() * elementCount; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/HResult.cs b/src/LibHac/Common/HResult.cs index 48fc4404..6d690526 100644 --- a/src/LibHac/Common/HResult.cs +++ b/src/LibHac/Common/HResult.cs @@ -39,4 +39,4 @@ internal static class HResult COR_E_IO => ResultFs.TargetLocked.Value, _ => ResultFs.UnexpectedInLocalFileSystemE.Value }; -} +} \ No newline at end of file diff --git a/src/LibHac/Common/InitializationGuard.cs b/src/LibHac/Common/InitializationGuard.cs index 98ff0c55..4898e295 100644 --- a/src/LibHac/Common/InitializationGuard.cs +++ b/src/LibHac/Common/InitializationGuard.cs @@ -91,4 +91,4 @@ internal readonly ref struct InitializationGuard { return (guard & 1) != 0; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/InteropWin32.cs b/src/LibHac/Common/InteropWin32.cs index 92d94cb7..7441f8d5 100644 --- a/src/LibHac/Common/InteropWin32.cs +++ b/src/LibHac/Common/InteropWin32.cs @@ -60,4 +60,4 @@ public static unsafe class InteropWin32 public Span FileName => MemoryMarshal.CreateSpan(ref _fileName[0], 260); public Span AlternateFileName => MemoryMarshal.CreateSpan(ref _alternateFileName[0], 14); } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/Keys/DefaultKeySet.cs b/src/LibHac/Common/Keys/DefaultKeySet.cs index 3e5e8acc..bdc2dce6 100644 --- a/src/LibHac/Common/Keys/DefaultKeySet.cs +++ b/src/LibHac/Common/Keys/DefaultKeySet.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - using Type = LibHac.Common.Keys.KeyInfo.KeyType; namespace LibHac.Common.Keys; diff --git a/src/LibHac/Common/Keys/ExternalKeyReader.cs b/src/LibHac/Common/Keys/ExternalKeyReader.cs index d3e30dcb..df4a990d 100644 --- a/src/LibHac/Common/Keys/ExternalKeyReader.cs +++ b/src/LibHac/Common/Keys/ExternalKeyReader.cs @@ -146,8 +146,7 @@ public static class ExternalKeyReader /// A list of all the keys that will be loaded into the key set. /// will create a list containing all loadable keys. /// An optional logger that key-parsing errors will be written to. - public static void ReadMainKeys(KeySet keySet, Stream reader, List keyList, - IProgressReport logger = null) + public static void ReadMainKeys(KeySet keySet, Stream reader, List keyList, IProgressReport logger = null) { if (reader == null) return; diff --git a/src/LibHac/Common/Keys/ExternalKeyWriter.cs b/src/LibHac/Common/Keys/ExternalKeyWriter.cs index 5ffa5b48..e718780b 100644 --- a/src/LibHac/Common/Keys/ExternalKeyWriter.cs +++ b/src/LibHac/Common/Keys/ExternalKeyWriter.cs @@ -5,7 +5,6 @@ using System.Text; using LibHac.Fs; using LibHac.Spl; using LibHac.Util; - using Type = LibHac.Common.Keys.KeyInfo.KeyType; using RangeType = LibHac.Common.Keys.KeyInfo.KeyRangeType; @@ -150,6 +149,7 @@ public static class ExternalKeyWriter PrintKeys(keySet, sb, DefaultKeySet.CreateKeyList(), Type.Common | Type.Seed | Type.DifferentDev, true); keySet.SetMode(KeySet.Mode.Prod); } + return sb.ToString(); } @@ -169,4 +169,4 @@ public static class ExternalKeyWriter keySet.SetMode(originalMode); return sb.ToString(); } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/Keys/KeyDerivation.cs b/src/LibHac/Common/Keys/KeyDerivation.cs index 76ad4af2..3297e6a5 100644 --- a/src/LibHac/Common/Keys/KeyDerivation.cs +++ b/src/LibHac/Common/Keys/KeyDerivation.cs @@ -400,4 +400,4 @@ internal static class KeyDerivation srcKek.Data.CopyTo(dest); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/Keys/KeyInfo.cs b/src/LibHac/Common/Keys/KeyInfo.cs index 4ee6630c..f5e427ca 100644 --- a/src/LibHac/Common/Keys/KeyInfo.cs +++ b/src/LibHac/Common/Keys/KeyInfo.cs @@ -163,4 +163,4 @@ public readonly struct KeyInfo return isValid1 && isValid2; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/Keys/MissingKeyException.cs b/src/LibHac/Common/Keys/MissingKeyException.cs index e458e1d5..63f807bb 100644 --- a/src/LibHac/Common/Keys/MissingKeyException.cs +++ b/src/LibHac/Common/Keys/MissingKeyException.cs @@ -34,18 +34,14 @@ public class MissingKeyException : LibHacException /// /// Initializes a new instance of the class. /// - public MissingKeyException() - { - } + public MissingKeyException() { } /// /// Initializes a new instance of the class with a specified error message. /// /// The error message that explains the reason for the exception. public MissingKeyException(string message) - : base(message) - { - } + : base(message) { } /// /// Initializes a new instance of the class with a specified error message @@ -54,9 +50,7 @@ public class MissingKeyException : LibHacException /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. public MissingKeyException(string message, Exception innerException) - : base(message, innerException) - { - } + : base(message, innerException) { } public override string Message { diff --git a/src/LibHac/Common/LibHacException.cs b/src/LibHac/Common/LibHacException.cs index 77dcbcac..3445c302 100644 --- a/src/LibHac/Common/LibHacException.cs +++ b/src/LibHac/Common/LibHacException.cs @@ -10,18 +10,14 @@ public class LibHacException : Exception /// /// Initializes a new instance of the class. /// - public LibHacException() - { - } + public LibHacException() { } /// /// Initializes a new instance of the class with a specified error message. /// /// The error message that explains the reason for the exception. public LibHacException(string message) - : base(message) - { - } + : base(message) { } /// /// Initializes a new instance of the class with a specified error message @@ -30,7 +26,5 @@ public class LibHacException : Exception /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. public LibHacException(string message, Exception innerException) - : base(message, innerException) - { - } + : base(message, innerException) { } } \ No newline at end of file diff --git a/src/LibHac/Common/NonCopyableAttribute.cs b/src/LibHac/Common/NonCopyableAttribute.cs index ad920f5a..057c1c6b 100644 --- a/src/LibHac/Common/NonCopyableAttribute.cs +++ b/src/LibHac/Common/NonCopyableAttribute.cs @@ -6,4 +6,4 @@ namespace LibHac.Common; public sealed class NonCopyableAttribute : Attribute { } [AttributeUsage(AttributeTargets.Struct)] -public sealed class NonCopyableDisposableAttribute : Attribute { } +public sealed class NonCopyableDisposableAttribute : Attribute { } \ No newline at end of file diff --git a/src/LibHac/Common/ProgressBar.cs b/src/LibHac/Common/ProgressBar.cs index c10e4de2..01accc58 100644 --- a/src/LibHac/Common/ProgressBar.cs +++ b/src/LibHac/Common/ProgressBar.cs @@ -110,6 +110,7 @@ public class ProgressBar : IDisposable, IProgressReport int progressBlockCount = (int)Math.Min(progress * BlockCount, BlockCount); text = $"[{new string('#', progressBlockCount)}{new string('-', BlockCount - progressBlockCount)}] {_progress}/{_total} {progress:P1} {Animation[_animationIndex++ % Animation.Length]}{speed}"; } + UpdateText(text); ResetTimer(); diff --git a/src/LibHac/Common/Ref.cs b/src/LibHac/Common/Ref.cs index 233a1b42..3ad5eee7 100644 --- a/src/LibHac/Common/Ref.cs +++ b/src/LibHac/Common/Ref.cs @@ -35,9 +35,7 @@ public readonly ref struct Ref /// The pointer to the target value. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe Ref(void* pointer) - : this(ref Unsafe.AsRef(pointer)) - { - } + : this(ref Unsafe.AsRef(pointer)) { } /// /// Gets the reference represented by the current instance. @@ -97,9 +95,7 @@ public readonly ref struct ReadOnlyRef /// The pointer to the target value. [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe ReadOnlyRef(void* pointer) - : this(in Unsafe.AsRef(pointer)) - { - } + : this(in Unsafe.AsRef(pointer)) { } /// /// Gets the reference represented by the current instance. @@ -130,4 +126,4 @@ public readonly ref struct ReadOnlyRef { return reference.Value; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/RentedArray.cs b/src/LibHac/Common/RentedArray.cs index baf29618..62f0351f 100644 --- a/src/LibHac/Common/RentedArray.cs +++ b/src/LibHac/Common/RentedArray.cs @@ -37,4 +37,4 @@ public readonly ref struct RentedArray ArrayPool.Shared.Return(Array); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/SharedObjectHelpers.cs b/src/LibHac/Common/SharedObjectHelpers.cs index f4db218d..6d527dc2 100644 --- a/src/LibHac/Common/SharedObjectHelpers.cs +++ b/src/LibHac/Common/SharedObjectHelpers.cs @@ -18,4 +18,4 @@ public static class Shared dest = value; value = default; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/SharedRef.cs b/src/LibHac/Common/SharedRef.cs index dfa64010..ae45b89a 100644 --- a/src/LibHac/Common/SharedRef.cs +++ b/src/LibHac/Common/SharedRef.cs @@ -437,4 +437,4 @@ public struct WeakRef : IDisposable where T : class, IDisposable return sharedRef; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/SpanHelpers.cs b/src/LibHac/Common/SpanHelpers.cs index 6b1334fb..49a93cd8 100644 --- a/src/LibHac/Common/SpanHelpers.cs +++ b/src/LibHac/Common/SpanHelpers.cs @@ -113,4 +113,4 @@ public static class SpanHelpers { return ref MemoryMarshal.Cast(span)[0]; } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/U8StringHelpers.cs b/src/LibHac/Common/U8StringHelpers.cs index 6a8d06eb..8e05f16a 100644 --- a/src/LibHac/Common/U8StringHelpers.cs +++ b/src/LibHac/Common/U8StringHelpers.cs @@ -11,4 +11,4 @@ public static class U8StringHelpers { return new U8Span(value); } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/UnsafeHelpers.cs b/src/LibHac/Common/UnsafeHelpers.cs index da844cea..5915a7ca 100644 --- a/src/LibHac/Common/UnsafeHelpers.cs +++ b/src/LibHac/Common/UnsafeHelpers.cs @@ -63,4 +63,4 @@ public static class UnsafeHelpers SkipParamInit(out value2); SkipParamInit(out value3); } -} +} \ No newline at end of file diff --git a/src/LibHac/Common/Utilities.cs b/src/LibHac/Common/Utilities.cs index 8c59f3f5..e2116d7a 100644 --- a/src/LibHac/Common/Utilities.cs +++ b/src/LibHac/Common/Utilities.cs @@ -230,6 +230,7 @@ public static class Utilities { return bytes.ToString("0 B"); // Byte } + // Divide by 1024 to get fractional value readable = readable / 1024; // Return formatted number with suffix diff --git a/src/LibHac/Crypto/CryptoUtil.cs b/src/LibHac/Crypto/CryptoUtil.cs index 9301c7ef..56a980de 100644 --- a/src/LibHac/Crypto/CryptoUtil.cs +++ b/src/LibHac/Crypto/CryptoUtil.cs @@ -26,4 +26,4 @@ internal static class CryptoUtil return result == 0; } -} +} \ No newline at end of file diff --git a/src/LibHac/Crypto/IHash.cs b/src/LibHac/Crypto/IHash.cs index 73295058..c96e3676 100644 --- a/src/LibHac/Crypto/IHash.cs +++ b/src/LibHac/Crypto/IHash.cs @@ -7,4 +7,4 @@ public interface IHash void Initialize(); void Update(ReadOnlySpan data); void GetHash(Span hashBuffer); -} +} \ No newline at end of file diff --git a/src/LibHac/Crypto/Impl/HashState.cs b/src/LibHac/Crypto/Impl/HashState.cs index 909c539d..23f6a91e 100644 --- a/src/LibHac/Crypto/Impl/HashState.cs +++ b/src/LibHac/Crypto/Impl/HashState.cs @@ -5,4 +5,4 @@ public enum HashState Initial = 0, Initialized, Done -} +} \ No newline at end of file diff --git a/src/LibHac/Crypto/Impl/Sha256Impl.cs b/src/LibHac/Crypto/Impl/Sha256Impl.cs index a1de9759..9ed4316e 100644 --- a/src/LibHac/Crypto/Impl/Sha256Impl.cs +++ b/src/LibHac/Crypto/Impl/Sha256Impl.cs @@ -48,4 +48,4 @@ public struct Sha256Impl _baseHash.Hash.CopyTo(hashBuffer); } -} +} \ No newline at end of file diff --git a/src/LibHac/Crypto/Rsa.cs b/src/LibHac/Crypto/Rsa.cs index 2605f3ee..1b28af86 100644 --- a/src/LibHac/Crypto/Rsa.cs +++ b/src/LibHac/Crypto/Rsa.cs @@ -142,8 +142,7 @@ public static class Rsa { rng.NextBytes(rndBuf); g = GetBigInteger(rndBuf); - } - while (g >= n); + } while (g >= n); y = BigInteger.ModPow(g, r, n); @@ -243,4 +242,4 @@ public static class Rsa return t; } -} +} \ No newline at end of file diff --git a/src/LibHac/Crypto/Sha256.cs b/src/LibHac/Crypto/Sha256.cs index 35f6f46d..5bdc3f32 100644 --- a/src/LibHac/Crypto/Sha256.cs +++ b/src/LibHac/Crypto/Sha256.cs @@ -24,4 +24,4 @@ public static class Sha256 sha256.Update(data); sha256.GetHash(hashBuffer); } -} +} \ No newline at end of file diff --git a/src/LibHac/Crypto/Sha256Generator.cs b/src/LibHac/Crypto/Sha256Generator.cs index 50f6f2d4..644a2fb9 100644 --- a/src/LibHac/Crypto/Sha256Generator.cs +++ b/src/LibHac/Crypto/Sha256Generator.cs @@ -26,4 +26,4 @@ public class Sha256Generator : IHash { _baseHash.GetHash(hashBuffer); } -} +} \ No newline at end of file diff --git a/src/LibHac/Diag/DiagClient.cs b/src/LibHac/Diag/DiagClient.cs index bce160e8..f3d615f5 100644 --- a/src/LibHac/Diag/DiagClient.cs +++ b/src/LibHac/Diag/DiagClient.cs @@ -34,4 +34,4 @@ public readonly struct DiagClientImpl internal ref DiagClientGlobals Globals => ref Diag.Globals; internal DiagClientImpl(DiagClient parentClient) => Diag = parentClient; -} +} \ No newline at end of file diff --git a/src/LibHac/Diag/Impl/ObserverManager.cs b/src/LibHac/Diag/Impl/ObserverManager.cs index a65e577e..f619be69 100644 --- a/src/LibHac/Diag/Impl/ObserverManager.cs +++ b/src/LibHac/Diag/Impl/ObserverManager.cs @@ -141,4 +141,4 @@ internal class LogObserverManager curNode = curNode.Next; } } -} +} \ No newline at end of file diff --git a/src/LibHac/Diag/Log.cs b/src/LibHac/Diag/Log.cs index df172d06..71eedf45 100644 --- a/src/LibHac/Diag/Log.cs +++ b/src/LibHac/Diag/Log.cs @@ -46,4 +46,4 @@ public static class Log /// "$" public static ReadOnlySpan EmptyModuleName => new[] { (byte)'$' }; // "$" -} +} \ No newline at end of file diff --git a/src/LibHac/Diag/LogObserver.cs b/src/LibHac/Diag/LogObserver.cs index 6464bcaa..74cf2064 100644 --- a/src/LibHac/Diag/LogObserver.cs +++ b/src/LibHac/Diag/LogObserver.cs @@ -107,4 +107,4 @@ namespace LibHac.Diag.Impl public LogMetaData MetaData; public LogBody Body; } -} +} \ No newline at end of file diff --git a/src/LibHac/Diag/LogTypes.cs b/src/LibHac/Diag/LogTypes.cs index deeb65e2..15fc67b2 100644 --- a/src/LibHac/Diag/LogTypes.cs +++ b/src/LibHac/Diag/LogTypes.cs @@ -34,4 +34,4 @@ public ref struct LogBody public U8Span Message; public bool IsHead; public bool IsTail; -} +} \ No newline at end of file diff --git a/src/LibHac/Fat/FatAttribute.cs b/src/LibHac/Fat/FatAttribute.cs index 1717f848..92c6f34a 100644 --- a/src/LibHac/Fat/FatAttribute.cs +++ b/src/LibHac/Fat/FatAttribute.cs @@ -5,4 +5,4 @@ public struct FatAttribute public bool IsFatSafeEnabled; public bool IsFatFormatNormalized; public bool IsTimeStampUpdated; -} +} \ No newline at end of file diff --git a/src/LibHac/Fat/FatFormatParam.cs b/src/LibHac/Fat/FatFormatParam.cs index 2c8964ea..dd3df882 100644 --- a/src/LibHac/Fat/FatFormatParam.cs +++ b/src/LibHac/Fat/FatFormatParam.cs @@ -8,4 +8,4 @@ public struct FatFormatParam public uint ProtectedAreaSectors; public Result WriteVerifyErrorResult; public Memory WorkBuffer; -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/AccessLog.cs b/src/LibHac/Fs/AccessLog.cs index 1fdba473..f3e8ed9f 100644 --- a/src/LibHac/Fs/AccessLog.cs +++ b/src/LibHac/Fs/AccessLog.cs @@ -492,7 +492,6 @@ namespace LibHac.Fs.Impl .Append(LogLineEnd); OutputAccessLogImpl(fs, new U8Span(sb.Buffer)); - } finally { diff --git a/src/LibHac/Fs/AccessLogHelpers.cs b/src/LibHac/Fs/AccessLogHelpers.cs index 6a7b18a3..639aa63b 100644 --- a/src/LibHac/Fs/AccessLogHelpers.cs +++ b/src/LibHac/Fs/AccessLogHelpers.cs @@ -8,4 +8,4 @@ public static class AccessLogHelpers return $"FS_ACCESS: {{ start: {(long)startTime.TotalMilliseconds,9}, end: {(long)endTime.TotalMilliseconds,9}, result: 0x{result.Value:x8}, handle: 0x{handleId:x8}, function: \"{caller}\"{message} }}"; } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Buffers/IBufferManager.cs b/src/LibHac/Fs/Buffers/IBufferManager.cs index 83788f48..cc166861 100644 --- a/src/LibHac/Fs/Buffers/IBufferManager.cs +++ b/src/LibHac/Fs/Buffers/IBufferManager.cs @@ -1,5 +1,4 @@ using System; - using Buffer = LibHac.Mem.Buffer; using CacheHandle = System.UInt64; diff --git a/src/LibHac/Fs/Common/Path.cs b/src/LibHac/Fs/Common/Path.cs index f705d6e4..97e37b12 100644 --- a/src/LibHac/Fs/Common/Path.cs +++ b/src/LibHac/Fs/Common/Path.cs @@ -1258,7 +1258,7 @@ public static class PathFunctions /// : was too small to contain the built path. internal static Result SetUpFixedPathSaveMetaName(ref Path path, Span pathBuffer, uint metaType) { - ReadOnlySpan metaExtension = new[] { (byte)'.', (byte)'m', (byte)'e', (byte)'t', (byte)'a' }; // ".meta" + ReadOnlySpan metaExtension = new[] { (byte)'.', (byte)'m', (byte)'e', (byte)'t', (byte)'a' }; // ".meta" var sb = new U8StringBuilder(pathBuffer); sb.Append((byte)'/').AppendFormat(metaType, 'x', 8).Append(metaExtension); @@ -1282,9 +1282,9 @@ public static class PathFunctions { ReadOnlySpan metaDirectoryName = new[] { - (byte)'/', (byte)'s', (byte)'a', (byte)'v', (byte)'e', (byte)'M', (byte)'e', (byte)'t', - (byte)'a', (byte)'/' - }; + (byte)'/', (byte)'s', (byte)'a', (byte)'v', (byte)'e', (byte)'M', (byte)'e', (byte)'t', + (byte)'a', (byte)'/' + }; var sb = new U8StringBuilder(pathBuffer); sb.Append(metaDirectoryName).AppendFormat(saveDataId, 'x', 16); diff --git a/src/LibHac/Fs/CommonPaths.cs b/src/LibHac/Fs/CommonPaths.cs index ff564dac..333cfeab 100644 --- a/src/LibHac/Fs/CommonPaths.cs +++ b/src/LibHac/Fs/CommonPaths.cs @@ -27,6 +27,6 @@ internal static class CommonPaths public static ReadOnlySpan SdCardNintendoRootDirectoryName => // Nintendo new[] { - (byte) 'N', (byte) 'i', (byte) 'n', (byte) 't', (byte) 'e', (byte) 'n', (byte) 'd', (byte) 'o' + (byte)'N', (byte)'i', (byte)'n', (byte)'t', (byte)'e', (byte)'n', (byte)'d', (byte)'o' }; -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/DirectoryEntry.cs b/src/LibHac/Fs/DirectoryEntry.cs index 6a222d57..b7fce4c4 100644 --- a/src/LibHac/Fs/DirectoryEntry.cs +++ b/src/LibHac/Fs/DirectoryEntry.cs @@ -2,6 +2,7 @@ using LibHac.Common.FixedArrays; namespace LibHac.Fs; + public struct DirectoryEntry { public Array769 Name; diff --git a/src/LibHac/Fs/DirectoryHandle.cs b/src/LibHac/Fs/DirectoryHandle.cs index 8390a5af..1f147f1c 100644 --- a/src/LibHac/Fs/DirectoryHandle.cs +++ b/src/LibHac/Fs/DirectoryHandle.cs @@ -21,4 +21,4 @@ public readonly struct DirectoryHandle : IDisposable Directory.GetParent().Hos.Fs.CloseDirectory(this); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/FileHandle.cs b/src/LibHac/Fs/FileHandle.cs index 2e90a547..da8e4e64 100644 --- a/src/LibHac/Fs/FileHandle.cs +++ b/src/LibHac/Fs/FileHandle.cs @@ -21,4 +21,4 @@ public readonly struct FileHandle : IDisposable File.Hos.Fs.CloseFile(this); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/FileOptions.cs b/src/LibHac/Fs/FileOptions.cs index 9837019e..554becce 100644 --- a/src/LibHac/Fs/FileOptions.cs +++ b/src/LibHac/Fs/FileOptions.cs @@ -39,4 +39,4 @@ public enum WriteOptionFlag { None = 0, Flush = 1 -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/FsContext.cs b/src/LibHac/Fs/FsContext.cs index 01f60ef6..562d9a6e 100644 --- a/src/LibHac/Fs/FsContext.cs +++ b/src/LibHac/Fs/FsContext.cs @@ -126,4 +126,4 @@ public struct ScopedAutoAbortDisabler { _fsClient.SetCurrentThreadFsContext(_prevContext); } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/FsEnums.cs b/src/LibHac/Fs/FsEnums.cs index 814d9618..cf5693b2 100644 --- a/src/LibHac/Fs/FsEnums.cs +++ b/src/LibHac/Fs/FsEnums.cs @@ -74,7 +74,6 @@ public enum FileSystemProxyType RegisteredUpdate = 8 } - public enum ImageDirectoryId { Nand = 0, diff --git a/src/LibHac/Fs/Fsa/FileSystemAccessor.cs b/src/LibHac/Fs/Fsa/FileSystemAccessor.cs index 8177e537..362dd0a2 100644 --- a/src/LibHac/Fs/Fsa/FileSystemAccessor.cs +++ b/src/LibHac/Fs/Fsa/FileSystemAccessor.cs @@ -311,6 +311,7 @@ internal class FileSystemAccessor : IDisposable res = _fileSystem.Get.RenameDirectory(in currentPathNormalized, in newPathNormalized); if (res.IsFailure()) return res.Miss(); } + return Result.Success; } @@ -578,7 +579,7 @@ internal class FileSystemAccessor : IDisposable public static ReadOnlySpan LogLineEnd => new[] { (byte)')', (byte)'\n' }; // ")\n" /// " | " - public static ReadOnlySpan LogOrOperator => new[] { (byte)' ', (byte)'|', (byte)' ' }; // " | " + public static ReadOnlySpan LogOrOperator => new[] { (byte)' ', (byte)'|', (byte)' ' }; // " | " /// "OpenMode_Read" private static ReadOnlySpan LogOpenModeRead => // "OpenMode_Read" diff --git a/src/LibHac/Fs/Fsa/IAttributeFileSystem.cs b/src/LibHac/Fs/Fsa/IAttributeFileSystem.cs index 8eb2d3cd..5401f7a6 100644 --- a/src/LibHac/Fs/Fsa/IAttributeFileSystem.cs +++ b/src/LibHac/Fs/Fsa/IAttributeFileSystem.cs @@ -27,4 +27,4 @@ public abstract class IAttributeFileSystem : IFileSystem protected abstract Result DoGetFileAttributes(out NxFileAttributes attributes, in Path path); protected abstract Result DoSetFileAttributes(in Path path, NxFileAttributes attributes); protected abstract Result DoGetFileSize(out long fileSize, in Path path); -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Fsa/IMultiCommitTarget.cs b/src/LibHac/Fs/Fsa/IMultiCommitTarget.cs index dbf6a2d5..6ed87d78 100644 --- a/src/LibHac/Fs/Fsa/IMultiCommitTarget.cs +++ b/src/LibHac/Fs/Fsa/IMultiCommitTarget.cs @@ -6,4 +6,4 @@ namespace LibHac.Fs.Fsa; public interface IMultiCommitTarget { SharedRef GetMultiCommitTarget(); -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/GameCard.cs b/src/LibHac/Fs/GameCard.cs index 6568c2c4..3cf956fb 100644 --- a/src/LibHac/Fs/GameCard.cs +++ b/src/LibHac/Fs/GameCard.cs @@ -1,5 +1,4 @@ global using GameCardHandle = System.UInt32; - using System; using LibHac.Common.FixedArrays; diff --git a/src/LibHac/Fs/Host.cs b/src/LibHac/Fs/Host.cs index 511a37c6..d3567fc2 100644 --- a/src/LibHac/Fs/Host.cs +++ b/src/LibHac/Fs/Host.cs @@ -27,4 +27,4 @@ public enum MountHostOptionFlag { None = 0, PseudoCaseSensitive = 1 -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Impl/FileRegion.cs b/src/LibHac/Fs/Impl/FileRegion.cs index 2a3b8872..2d9d3bd0 100644 --- a/src/LibHac/Fs/Impl/FileRegion.cs +++ b/src/LibHac/Fs/Impl/FileRegion.cs @@ -89,4 +89,4 @@ public readonly struct FileRegion return new FileRegion(inclusionStartOffset, inclusionSize); } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Impl/ReaderWriterLockHandlers.cs b/src/LibHac/Fs/Impl/ReaderWriterLockHandlers.cs index 2faa88c6..757f01a2 100644 --- a/src/LibHac/Fs/Impl/ReaderWriterLockHandlers.cs +++ b/src/LibHac/Fs/Impl/ReaderWriterLockHandlers.cs @@ -49,4 +49,4 @@ public class SharedLock : IDisposable _lock.EnterReadLock(); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Impl/SdHandleManager.cs b/src/LibHac/Fs/Impl/SdHandleManager.cs index b6de7090..1495d124 100644 --- a/src/LibHac/Fs/Impl/SdHandleManager.cs +++ b/src/LibHac/Fs/Impl/SdHandleManager.cs @@ -30,4 +30,4 @@ internal class SdHandleManager : IDeviceHandleManager return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/PathTool.cs b/src/LibHac/Fs/PathTool.cs index 95fefe21..f55afac1 100644 --- a/src/LibHac/Fs/PathTool.cs +++ b/src/LibHac/Fs/PathTool.cs @@ -5,4 +5,4 @@ public static class PathTool // These are kept in nn::fs, but C# requires them to be inside a class internal const int EntryNameLengthMax = 0x300; internal const int MountNameLengthMax = 15; -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/ResultHandlingUtility.cs b/src/LibHac/Fs/ResultHandlingUtility.cs index d70a80ba..be1ea0d7 100644 --- a/src/LibHac/Fs/ResultHandlingUtility.cs +++ b/src/LibHac/Fs/ResultHandlingUtility.cs @@ -75,4 +75,4 @@ public static class ResultHandlingUtility if (!result.IsSuccess()) Abort.DoAbort(result); } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/ScopedSetter.cs b/src/LibHac/Fs/ScopedSetter.cs index a6873872..9abbf26c 100644 --- a/src/LibHac/Fs/ScopedSetter.cs +++ b/src/LibHac/Fs/ScopedSetter.cs @@ -25,4 +25,4 @@ public ref struct ScopedSetter { return new ScopedSetter(ref reference, value); } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Shim/BaseFileSystem.cs b/src/LibHac/Fs/Shim/BaseFileSystem.cs index f73401c8..866bf28b 100644 --- a/src/LibHac/Fs/Shim/BaseFileSystem.cs +++ b/src/LibHac/Fs/Shim/BaseFileSystem.cs @@ -2,7 +2,6 @@ using LibHac.Fs.Fsa; using LibHac.Fs.Impl; using LibHac.FsSrv.Sf; - using IFileSystem = LibHac.Fs.Fsa.IFileSystem; using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem; diff --git a/src/LibHac/Fs/Shim/BcatSaveData.cs b/src/LibHac/Fs/Shim/BcatSaveData.cs index acab83c4..ee7bed8f 100644 --- a/src/LibHac/Fs/Shim/BcatSaveData.cs +++ b/src/LibHac/Fs/Shim/BcatSaveData.cs @@ -5,7 +5,6 @@ using LibHac.Fs.Fsa; using LibHac.Fs.Impl; using LibHac.FsSrv.Sf; using LibHac.Os; - using static LibHac.Fs.Impl.AccessLogStrings; using static LibHac.Fs.SaveData; using IFileSystem = LibHac.Fs.Fsa.IFileSystem; diff --git a/src/LibHac/Fs/Shim/DeviceSaveData.cs b/src/LibHac/Fs/Shim/DeviceSaveData.cs index 3f698387..4b1d7cb4 100644 --- a/src/LibHac/Fs/Shim/DeviceSaveData.cs +++ b/src/LibHac/Fs/Shim/DeviceSaveData.cs @@ -8,7 +8,6 @@ using LibHac.Ncm; using LibHac.Os; using IFileSystem = LibHac.Fs.Fsa.IFileSystem; using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem; - using static LibHac.Fs.Impl.AccessLogStrings; using static LibHac.Fs.SaveData; diff --git a/src/LibHac/Fs/Shim/FileSystemProxyServiceObject.cs b/src/LibHac/Fs/Shim/FileSystemProxyServiceObject.cs index 21def861..ed2778ac 100644 --- a/src/LibHac/Fs/Shim/FileSystemProxyServiceObject.cs +++ b/src/LibHac/Fs/Shim/FileSystemProxyServiceObject.cs @@ -144,4 +144,4 @@ public static class FileSystemProxyServiceObject { fs.Globals.FileSystemProxyServiceObject.DfcFileSystemProxyServiceObject.SetByMove(ref serviceObject); } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Shim/FileSystemServiceObjectAdapter.cs b/src/LibHac/Fs/Shim/FileSystemServiceObjectAdapter.cs index 58ce2bc4..409fb504 100644 --- a/src/LibHac/Fs/Shim/FileSystemServiceObjectAdapter.cs +++ b/src/LibHac/Fs/Shim/FileSystemServiceObjectAdapter.cs @@ -5,7 +5,6 @@ using LibHac.Common; using LibHac.Fs.Fsa; using LibHac.Sf; using LibHac.Util; - using IFile = LibHac.Fs.Fsa.IFile; using IFileSf = LibHac.FsSrv.Sf.IFile; using IDirectory = LibHac.Fs.Fsa.IDirectory; diff --git a/src/LibHac/Fs/Shim/GameCard.cs b/src/LibHac/Fs/Shim/GameCard.cs index 6219d103..a4faf518 100644 --- a/src/LibHac/Fs/Shim/GameCard.cs +++ b/src/LibHac/Fs/Shim/GameCard.cs @@ -9,10 +9,8 @@ using LibHac.Gc; using LibHac.Os; using LibHac.Sf; using LibHac.Util; - using static LibHac.Fs.Impl.AccessLogStrings; using static LibHac.Gc.Values; - using IFileSystem = LibHac.Fs.Fsa.IFileSystem; using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem; using IStorageSf = LibHac.FsSrv.Sf.IStorage; diff --git a/src/LibHac/Fs/Shim/ImageDirectory.cs b/src/LibHac/Fs/Shim/ImageDirectory.cs index 73f2f55b..78460b13 100644 --- a/src/LibHac/Fs/Shim/ImageDirectory.cs +++ b/src/LibHac/Fs/Shim/ImageDirectory.cs @@ -6,7 +6,6 @@ using LibHac.FsSrv.Sf; using LibHac.Os; using IFileSystem = LibHac.Fs.Fsa.IFileSystem; using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem; - using static LibHac.Fs.Impl.AccessLogStrings; namespace LibHac.Fs.Shim; diff --git a/src/LibHac/Fs/Shim/Logo.cs b/src/LibHac/Fs/Shim/Logo.cs index 4b358dd1..4d4ac225 100644 --- a/src/LibHac/Fs/Shim/Logo.cs +++ b/src/LibHac/Fs/Shim/Logo.cs @@ -7,7 +7,6 @@ using LibHac.Ncm; using LibHac.Os; using IFileSystem = LibHac.Fs.Fsa.IFileSystem; using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem; - using static LibHac.Fs.Impl.AccessLogStrings; namespace LibHac.Fs.Shim; diff --git a/src/LibHac/Fs/Shim/Priority.cs b/src/LibHac/Fs/Shim/Priority.cs index 52a820ed..f5eb099a 100644 --- a/src/LibHac/Fs/Shim/Priority.cs +++ b/src/LibHac/Fs/Shim/Priority.cs @@ -48,4 +48,4 @@ namespace LibHac.Fs.Shim return PriorityRaw.Normal; } } -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/Shim/SaveDataForDebug.cs b/src/LibHac/Fs/Shim/SaveDataForDebug.cs index 24e775b1..a0b5075f 100644 --- a/src/LibHac/Fs/Shim/SaveDataForDebug.cs +++ b/src/LibHac/Fs/Shim/SaveDataForDebug.cs @@ -5,7 +5,6 @@ using LibHac.Diag; using LibHac.Fs.Impl; using LibHac.FsSrv.Sf; using LibHac.Os; - using static LibHac.Fs.Impl.AccessLogStrings; using static LibHac.Fs.SaveData; diff --git a/src/LibHac/Fs/Shim/SaveDataManagement.cs b/src/LibHac/Fs/Shim/SaveDataManagement.cs index 9335570a..0bce6630 100644 --- a/src/LibHac/Fs/Shim/SaveDataManagement.cs +++ b/src/LibHac/Fs/Shim/SaveDataManagement.cs @@ -12,7 +12,6 @@ using LibHac.Ncm; using LibHac.Os; using LibHac.Sf; using LibHac.Time; - using static LibHac.Fs.Impl.AccessLogStrings; using static LibHac.Fs.SaveData; diff --git a/src/LibHac/Fs/Shim/SaveDataTransferVersion2.cs b/src/LibHac/Fs/Shim/SaveDataTransferVersion2.cs index 812fec30..a33c0d9e 100644 --- a/src/LibHac/Fs/Shim/SaveDataTransferVersion2.cs +++ b/src/LibHac/Fs/Shim/SaveDataTransferVersion2.cs @@ -8,7 +8,6 @@ using LibHac.Fs.Shim; using LibHac.FsSrv.Sf; using LibHac.Sf; using LibHac.Util; - using static LibHac.Fs.SaveData; // ReSharper disable once CheckNamespace diff --git a/src/LibHac/Fs/Shim/SystemSaveData.cs b/src/LibHac/Fs/Shim/SystemSaveData.cs index 6f7e5dc8..8f3454ba 100644 --- a/src/LibHac/Fs/Shim/SystemSaveData.cs +++ b/src/LibHac/Fs/Shim/SystemSaveData.cs @@ -5,7 +5,6 @@ using LibHac.Fs.Fsa; using LibHac.Fs.Impl; using LibHac.FsSrv.Sf; using LibHac.Os; - using static LibHac.Fs.Impl.AccessLogStrings; using static LibHac.Fs.SaveData; using IFileSystem = LibHac.Fs.Fsa.IFileSystem; diff --git a/src/LibHac/Fs/StringTraits.cs b/src/LibHac/Fs/StringTraits.cs index fd46a55f..429b210b 100644 --- a/src/LibHac/Fs/StringTraits.cs +++ b/src/LibHac/Fs/StringTraits.cs @@ -7,4 +7,4 @@ internal static class StringTraits public const byte DriveSeparator = (byte)':'; public const byte Dot = (byte)'.'; public const byte NullTerminator = 0; -} +} \ No newline at end of file diff --git a/src/LibHac/Fs/UserId.cs b/src/LibHac/Fs/UserId.cs index 661a8c37..42bc16d0 100644 --- a/src/LibHac/Fs/UserId.cs +++ b/src/LibHac/Fs/UserId.cs @@ -55,4 +55,4 @@ public struct UserId : IEquatable, IComparable, IComparable public static bool operator >(UserId left, UserId right) => left.CompareTo(right) > 0; public static bool operator <=(UserId left, UserId right) => left.CompareTo(right) <= 0; public static bool operator >=(UserId left, UserId right) => left.CompareTo(right) >= 0; -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/AccessFailureManagementService.cs b/src/LibHac/FsSrv/AccessFailureManagementService.cs index 1ab17106..9201a003 100644 --- a/src/LibHac/FsSrv/AccessFailureManagementService.cs +++ b/src/LibHac/FsSrv/AccessFailureManagementService.cs @@ -99,4 +99,4 @@ public readonly struct AccessFailureManagementService return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/AccessFailureManagementServiceImpl.cs b/src/LibHac/FsSrv/AccessFailureManagementServiceImpl.cs index d703771d..55ad8aee 100644 --- a/src/LibHac/FsSrv/AccessFailureManagementServiceImpl.cs +++ b/src/LibHac/FsSrv/AccessFailureManagementServiceImpl.cs @@ -65,4 +65,4 @@ public class AccessFailureManagementServiceImpl { throw new NotImplementedException(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/AccessLogService.cs b/src/LibHac/FsSrv/AccessLogService.cs index 0bc825f9..8857000b 100644 --- a/src/LibHac/FsSrv/AccessLogService.cs +++ b/src/LibHac/FsSrv/AccessLogService.cs @@ -67,10 +67,10 @@ internal readonly struct AccessLogService private static ReadOnlySpan MultiProgramTag => // FS_ACCESS: { multi_program_tag: true }\n new[] { - (byte) 'F', (byte) 'S', (byte) '_', (byte) 'A', (byte) 'C', (byte) 'C', (byte) 'E', (byte) 'S', - (byte) 'S', (byte) ':', (byte) ' ', (byte) '{', (byte) ' ', (byte) 'm', (byte) 'u', (byte) 'l', - (byte) 't', (byte) 'i', (byte) '_', (byte) 'p', (byte) 'r', (byte) 'o', (byte) 'g', (byte) 'r', - (byte) 'a', (byte) 'm', (byte) '_', (byte) 't', (byte) 'a', (byte) 'g', (byte) ':', (byte) ' ', - (byte) 't', (byte) 'r', (byte) 'u', (byte) 'e', (byte) ' ', (byte) '}', (byte) '\n' + (byte)'F', (byte)'S', (byte)'_', (byte)'A', (byte)'C', (byte)'C', (byte)'E', (byte)'S', + (byte)'S', (byte)':', (byte)' ', (byte)'{', (byte)' ', (byte)'m', (byte)'u', (byte)'l', + (byte)'t', (byte)'i', (byte)'_', (byte)'p', (byte)'r', (byte)'o', (byte)'g', (byte)'r', + (byte)'a', (byte)'m', (byte)'_', (byte)'t', (byte)'a', (byte)'g', (byte)':', (byte)' ', + (byte)'t', (byte)'r', (byte)'u', (byte)'e', (byte)' ', (byte)'}', (byte)'\n' }; } \ No newline at end of file diff --git a/src/LibHac/FsSrv/AccessLogServiceImpl.cs b/src/LibHac/FsSrv/AccessLogServiceImpl.cs index fd7dc5e7..a919208c 100644 --- a/src/LibHac/FsSrv/AccessLogServiceImpl.cs +++ b/src/LibHac/FsSrv/AccessLogServiceImpl.cs @@ -62,4 +62,4 @@ public class AccessLogServiceImpl : IDisposable var registry = new ProgramRegistryImpl(_config.FsServer); return registry.GetProgramInfo(out programInfo, processId); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/BaseFileSystemService.cs b/src/LibHac/FsSrv/BaseFileSystemService.cs index b73fa3a9..e60ded8c 100644 --- a/src/LibHac/FsSrv/BaseFileSystemService.cs +++ b/src/LibHac/FsSrv/BaseFileSystemService.cs @@ -324,4 +324,4 @@ public readonly struct BaseFileSystemService return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/BaseFileSystemServiceImpl.cs b/src/LibHac/FsSrv/BaseFileSystemServiceImpl.cs index 00c2b71a..a35dc8b0 100644 --- a/src/LibHac/FsSrv/BaseFileSystemServiceImpl.cs +++ b/src/LibHac/FsSrv/BaseFileSystemServiceImpl.cs @@ -123,4 +123,4 @@ public class BaseFileSystemServiceImpl var registry = new ProgramRegistryImpl(_config.FsServer); return registry.GetProgramInfo(out programInfo, processId); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/BaseStorageService.cs b/src/LibHac/FsSrv/BaseStorageService.cs index b3253a51..e4ffe01b 100644 --- a/src/LibHac/FsSrv/BaseStorageService.cs +++ b/src/LibHac/FsSrv/BaseStorageService.cs @@ -239,4 +239,4 @@ public class BaseStorageServiceImpl outDeviceOperator.SetByCopy(in _deviceOperator); return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/EmulatedGameCard.cs b/src/LibHac/FsSrv/EmulatedGameCard.cs index bbb47c93..db113a6e 100644 --- a/src/LibHac/FsSrv/EmulatedGameCard.cs +++ b/src/LibHac/FsSrv/EmulatedGameCard.cs @@ -20,6 +20,7 @@ public class EmulatedGameCard { KeySet = keySet; } + public GameCardHandle GetGameCardHandle() { return Handle; diff --git a/src/LibHac/FsSrv/EmulatedSdCard.cs b/src/LibHac/FsSrv/EmulatedSdCard.cs index 183ca7b4..d8c007d9 100644 --- a/src/LibHac/FsSrv/EmulatedSdCard.cs +++ b/src/LibHac/FsSrv/EmulatedSdCard.cs @@ -13,4 +13,4 @@ public class EmulatedSdCard { IsInserted = isInserted; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/ExternalKeySet.cs b/src/LibHac/FsSrv/ExternalKeySet.cs index 7bd4a3a5..78a05304 100644 --- a/src/LibHac/FsSrv/ExternalKeySet.cs +++ b/src/LibHac/FsSrv/ExternalKeySet.cs @@ -98,4 +98,4 @@ public class ExternalKeySet { ExternalKeys.EnsureCapacity(capacity); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreator.cs index 43c5bf34..9d4c3fd1 100644 --- a/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreator.cs @@ -2,7 +2,6 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; - using Utility = LibHac.FsSrv.Impl.Utility; namespace LibHac.FsSrv.FsCreator; diff --git a/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreatorConfig.cs b/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreatorConfig.cs index 60b97216..319108ec 100644 --- a/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreatorConfig.cs +++ b/src/LibHac/FsSrv/FsCreator/EmulatedBisFileSystemCreatorConfig.cs @@ -89,4 +89,4 @@ public class EmulatedBisFileSystemCreatorConfig { return id >= BisPartitionId.CalibrationFile && id <= BisPartitionId.System; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/EmulatedSdCardFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/EmulatedSdCardFileSystemCreator.cs index cac3a50b..0b693ad7 100644 --- a/src/LibHac/FsSrv/FsCreator/EmulatedSdCardFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/EmulatedSdCardFileSystemCreator.cs @@ -3,7 +3,6 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.Util; - using Utility = LibHac.FsSrv.Impl.Utility; namespace LibHac.FsSrv.FsCreator; diff --git a/src/LibHac/FsSrv/FsCreator/FileSystemCreatorInterfaces.cs b/src/LibHac/FsSrv/FsCreator/FileSystemCreatorInterfaces.cs index 46235ad9..40ad8fd9 100644 --- a/src/LibHac/FsSrv/FsCreator/FileSystemCreatorInterfaces.cs +++ b/src/LibHac/FsSrv/FsCreator/FileSystemCreatorInterfaces.cs @@ -18,4 +18,4 @@ public class FileSystemCreatorInterfaces public IMemoryStorageCreator MemoryStorageCreator { get; set; } public IBuiltInStorageFileSystemCreator BuiltInStorageFileSystemCreator { get; set; } public ISdCardProxyFileSystemCreator SdCardFileSystemCreator { get; set; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IBuiltInStorageCreator.cs b/src/LibHac/FsSrv/FsCreator/IBuiltInStorageCreator.cs index 46447f4d..c079a9ee 100644 --- a/src/LibHac/FsSrv/FsCreator/IBuiltInStorageCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IBuiltInStorageCreator.cs @@ -7,4 +7,4 @@ public interface IBuiltInStorageCreator { Result Create(ref SharedRef outStorage, BisPartitionId partitionId); Result InvalidateCache(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IBuiltInStorageFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/IBuiltInStorageFileSystemCreator.cs index ad412044..01238cc1 100644 --- a/src/LibHac/FsSrv/FsCreator/IBuiltInStorageFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IBuiltInStorageFileSystemCreator.cs @@ -7,4 +7,4 @@ namespace LibHac.FsSrv.FsCreator; public interface IBuiltInStorageFileSystemCreator { Result Create(ref SharedRef outFileSystem, BisPartitionId partitionId, bool caseSensitive); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IEncryptedFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/IEncryptedFileSystemCreator.cs index ce2f91ab..10e65124 100644 --- a/src/LibHac/FsSrv/FsCreator/IEncryptedFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IEncryptedFileSystemCreator.cs @@ -15,4 +15,4 @@ public interface IEncryptedFileSystemCreator Result Create(ref SharedRef outEncryptedFileSystem, ref SharedRef baseFileSystem, KeyId idIndex, in EncryptionSeed encryptionSeed); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IFatFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/IFatFileSystemCreator.cs index 4f1fb92f..16f9f335 100644 --- a/src/LibHac/FsSrv/FsCreator/IFatFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IFatFileSystemCreator.cs @@ -12,4 +12,4 @@ public interface IFatFileSystemCreator Result Format(ref SharedRef partitionStorage, FatAttribute attribute, FatFormatParam formatParam, int driveId, Result invalidFatFormatResult, Result usableSpaceNotEnoughResult); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IGameCardFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/IGameCardFileSystemCreator.cs index 8fc65336..c6ee3577 100644 --- a/src/LibHac/FsSrv/FsCreator/IGameCardFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IGameCardFileSystemCreator.cs @@ -7,4 +7,4 @@ namespace LibHac.FsSrv.FsCreator; public interface IGameCardFileSystemCreator { Result Create(ref SharedRef outFileSystem, GameCardHandle handle, GameCardPartition partitionType); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IGameCardStorageCreator.cs b/src/LibHac/FsSrv/FsCreator/IGameCardStorageCreator.cs index b1ac8e25..a14159ed 100644 --- a/src/LibHac/FsSrv/FsCreator/IGameCardStorageCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IGameCardStorageCreator.cs @@ -8,4 +8,4 @@ public interface IGameCardStorageCreator Result CreateReadOnly(GameCardHandle handle, ref SharedRef outStorage); Result CreateSecureReadOnly(GameCardHandle handle, ref SharedRef outStorage); Result CreateWriteOnly(GameCardHandle handle, ref SharedRef outStorage); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IMemoryStorageCreator.cs b/src/LibHac/FsSrv/FsCreator/IMemoryStorageCreator.cs index 95f87274..18ce63af 100644 --- a/src/LibHac/FsSrv/FsCreator/IMemoryStorageCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IMemoryStorageCreator.cs @@ -7,4 +7,4 @@ public interface IMemoryStorageCreator { Result Create(out IStorage storage, out Memory buffer, int storageId); Result RegisterBuffer(int storageId, Memory buffer); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs index c1d82fe2..ce5ee001 100644 --- a/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs @@ -7,4 +7,4 @@ namespace LibHac.FsSrv.FsCreator; public interface IPartitionFileSystemCreator { Result Create(ref SharedRef outFileSystem, ref SharedRef baseStorage); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/IRomFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/IRomFileSystemCreator.cs index 08c45ee9..edd1ead6 100644 --- a/src/LibHac/FsSrv/FsCreator/IRomFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IRomFileSystemCreator.cs @@ -7,4 +7,4 @@ namespace LibHac.FsSrv.FsCreator; public interface IRomFileSystemCreator { Result Create(ref SharedRef outFileSystem, ref SharedRef romFsStorage); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/ISdCardProxyFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/ISdCardProxyFileSystemCreator.cs index 01831291..fc3881b6 100644 --- a/src/LibHac/FsSrv/FsCreator/ISdCardProxyFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/ISdCardProxyFileSystemCreator.cs @@ -20,4 +20,4 @@ public interface ISdCardProxyFileSystemCreator /// /// The of the operation. Result Format(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/ISdStorageCreator.cs b/src/LibHac/FsSrv/FsCreator/ISdStorageCreator.cs index d9746976..6c6351f0 100644 --- a/src/LibHac/FsSrv/FsCreator/ISdStorageCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/ISdStorageCreator.cs @@ -5,4 +5,4 @@ namespace LibHac.FsSrv.FsCreator; public interface ISdStorageCreator { Result Create(out IStorage storage); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/ISubDirectoryFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/ISubDirectoryFileSystemCreator.cs index 859fbb8e..72c4ac07 100644 --- a/src/LibHac/FsSrv/FsCreator/ISubDirectoryFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/ISubDirectoryFileSystemCreator.cs @@ -7,4 +7,4 @@ namespace LibHac.FsSrv.FsCreator; public interface ISubDirectoryFileSystemCreator { Result Create(ref SharedRef outSubDirFileSystem, ref SharedRef baseFileSystem, in Path path); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/ITargetManagerFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/ITargetManagerFileSystemCreator.cs index b4e0aae6..c1b92611 100644 --- a/src/LibHac/FsSrv/FsCreator/ITargetManagerFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/ITargetManagerFileSystemCreator.cs @@ -8,4 +8,4 @@ public interface ITargetManagerFileSystemCreator { Result Create(ref SharedRef outFileSystem, in Path rootPath, bool openCaseSensitive, bool ensureRootPathExists, Result pathNotFoundResult); Result NormalizeCaseOfPath(out bool isSupported, ref Path path); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs index fde875b0..8649c21d 100644 --- a/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs @@ -19,4 +19,4 @@ public class PartitionFileSystemCreator : IPartitionFileSystemCreator outFileSystem.SetByMove(ref partitionFs.Ref()); return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/SaveDataFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/SaveDataFileSystemCreator.cs index 07a05c21..9dbd7f5e 100644 --- a/src/LibHac/FsSrv/FsCreator/SaveDataFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/SaveDataFileSystemCreator.cs @@ -7,7 +7,6 @@ using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; using LibHac.Util; - using OpenType = LibHac.FsSrv.SaveDataOpenTypeSetFileStorage.OpenType; namespace LibHac.FsSrv.FsCreator; diff --git a/src/LibHac/FsSrv/FsCreator/SubDirectoryFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/SubDirectoryFileSystemCreator.cs index db484754..beaa25b3 100644 --- a/src/LibHac/FsSrv/FsCreator/SubDirectoryFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/SubDirectoryFileSystemCreator.cs @@ -28,4 +28,4 @@ public class SubDirectoryFileSystemCreator : ISubDirectoryFileSystemCreator outSubDirFileSystem.SetByMove(ref subFs.Ref()); return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/FsCreator/TargetManagerFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/TargetManagerFileSystemCreator.cs index 9eba9875..581d1e9f 100644 --- a/src/LibHac/FsSrv/FsCreator/TargetManagerFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/TargetManagerFileSystemCreator.cs @@ -17,4 +17,4 @@ public class TargetManagerFileSystemCreator : ITargetManagerFileSystemCreator { throw new NotImplementedException(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/GameCardInfo.cs b/src/LibHac/FsSrv/GameCardInfo.cs index e965568a..d4713b2b 100644 --- a/src/LibHac/FsSrv/GameCardInfo.cs +++ b/src/LibHac/FsSrv/GameCardInfo.cs @@ -14,4 +14,4 @@ internal class GameCardInfo public int UpdateVersion { get; set; } public ulong UpdateTitleId { get; set; } public GameCardAttribute Attribute { get; set; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/IDeviceHandleManager.cs b/src/LibHac/FsSrv/IDeviceHandleManager.cs index 057fa8a3..77ce21b1 100644 --- a/src/LibHac/FsSrv/IDeviceHandleManager.cs +++ b/src/LibHac/FsSrv/IDeviceHandleManager.cs @@ -6,4 +6,4 @@ public interface IDeviceHandleManager { Result GetHandle(out StorageDeviceHandle handle); bool IsValid(in StorageDeviceHandle handle); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/ISaveDataIndexer.cs b/src/LibHac/FsSrv/ISaveDataIndexer.cs index 31d7ae1c..7406ea2a 100644 --- a/src/LibHac/FsSrv/ISaveDataIndexer.cs +++ b/src/LibHac/FsSrv/ISaveDataIndexer.cs @@ -145,4 +145,4 @@ public interface ISaveDataIndexer : IDisposable /// If the method returns successfully, contains the created . /// The of the operation. Result OpenSaveDataInfoReader(ref SharedRef outInfoReader); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/ISaveDataIndexerManager.cs b/src/LibHac/FsSrv/ISaveDataIndexerManager.cs index 62bfe637..b9f861b6 100644 --- a/src/LibHac/FsSrv/ISaveDataIndexerManager.cs +++ b/src/LibHac/FsSrv/ISaveDataIndexerManager.cs @@ -8,4 +8,4 @@ public interface ISaveDataIndexerManager Result OpenSaveDataIndexerAccessor(ref UniqueRef outAccessor, out bool isInitialOpen, SaveDataSpaceId spaceId); void ResetIndexer(SaveDataSpaceId spaceId); void InvalidateIndexer(SaveDataSpaceId spaceId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/IStackUsageReporter.cs b/src/LibHac/FsSrv/IStackUsageReporter.cs index 427bc3bc..49fdd5b5 100644 --- a/src/LibHac/FsSrv/IStackUsageReporter.cs +++ b/src/LibHac/FsSrv/IStackUsageReporter.cs @@ -3,4 +3,4 @@ public interface IStackUsageReporter { uint GetStackUsage(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/AccessFailureDetectionEventManager.cs b/src/LibHac/FsSrv/Impl/AccessFailureDetectionEventManager.cs index 1e429afa..909b5289 100644 --- a/src/LibHac/FsSrv/Impl/AccessFailureDetectionEventManager.cs +++ b/src/LibHac/FsSrv/Impl/AccessFailureDetectionEventManager.cs @@ -36,4 +36,4 @@ public class AccessFailureDetectionEventManager { throw new NotImplementedException(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/AsynchronousAccessFileSystem.cs b/src/LibHac/FsSrv/Impl/AsynchronousAccessFileSystem.cs index 0b78afd0..4b50c4c6 100644 --- a/src/LibHac/FsSrv/Impl/AsynchronousAccessFileSystem.cs +++ b/src/LibHac/FsSrv/Impl/AsynchronousAccessFileSystem.cs @@ -17,4 +17,4 @@ public class AsynchronousAccessFileSystem : ForwardingFileSystem // Todo: Implement return base.DoOpenFile(ref outFile, path, mode); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/BisWiper.cs b/src/LibHac/FsSrv/Impl/BisWiper.cs index 24f97fe1..4b9dfd87 100644 --- a/src/LibHac/FsSrv/Impl/BisWiper.cs +++ b/src/LibHac/FsSrv/Impl/BisWiper.cs @@ -30,4 +30,4 @@ internal class BisWiper : IWiper public void Dispose() { } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs b/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs index 04f088a9..8dc01b89 100644 --- a/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs +++ b/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs @@ -40,4 +40,4 @@ public class DeepRetryFileSystem : ForwardingFileSystem // Todo: Implement return base.DoOpenFile(ref outFile, path, mode); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs b/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs index d686f14c..a5ce5c89 100644 --- a/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs +++ b/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs @@ -6,7 +6,6 @@ using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; using LibHac.Sf; - using IFile = LibHac.Fs.Fsa.IFile; using IFileSf = LibHac.FsSrv.Sf.IFile; using IDirectory = LibHac.Fs.Fsa.IDirectory; diff --git a/src/LibHac/FsSrv/Impl/IDeviceEventSimulator.cs b/src/LibHac/FsSrv/Impl/IDeviceEventSimulator.cs index 6c5a505d..e957b716 100644 --- a/src/LibHac/FsSrv/Impl/IDeviceEventSimulator.cs +++ b/src/LibHac/FsSrv/Impl/IDeviceEventSimulator.cs @@ -182,4 +182,4 @@ public class SdCardEventSimulator : IDeviceEventSimulator _ => ResultFs.InvalidArgument.Log() }; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/IEntryOpenCountSemaphoreManager.cs b/src/LibHac/FsSrv/Impl/IEntryOpenCountSemaphoreManager.cs index 7af66f13..2cace2df 100644 --- a/src/LibHac/FsSrv/Impl/IEntryOpenCountSemaphoreManager.cs +++ b/src/LibHac/FsSrv/Impl/IEntryOpenCountSemaphoreManager.cs @@ -7,4 +7,4 @@ namespace LibHac.FsSrv.Impl; public interface IEntryOpenCountSemaphoreManager : IDisposable { Result TryAcquireEntryOpenCountSemaphore(ref UniqueRef outSemaphore); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/IRomFileSystemAccessFailureManager.cs b/src/LibHac/FsSrv/Impl/IRomFileSystemAccessFailureManager.cs index 0b875686..cd171e57 100644 --- a/src/LibHac/FsSrv/Impl/IRomFileSystemAccessFailureManager.cs +++ b/src/LibHac/FsSrv/Impl/IRomFileSystemAccessFailureManager.cs @@ -13,4 +13,4 @@ public interface IRomFileSystemAccessFailureManager : IDisposable void IncrementRomFsRemountForDataCorruptionCount(); void IncrementRomFsUnrecoverableDataCorruptionByRemountCount(); void IncrementRomFsRecoveredByInvalidateCacheCount(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/ISaveDataMultiCommitCoreInterface.cs b/src/LibHac/FsSrv/Impl/ISaveDataMultiCommitCoreInterface.cs index 1bc6e6ad..ef65689c 100644 --- a/src/LibHac/FsSrv/Impl/ISaveDataMultiCommitCoreInterface.cs +++ b/src/LibHac/FsSrv/Impl/ISaveDataMultiCommitCoreInterface.cs @@ -11,4 +11,4 @@ public interface ISaveDataMultiCommitCoreInterface : IDisposable Result IsProvisionallyCommittedSaveData(out bool isProvisionallyCommitted, in SaveDataInfo saveInfo); Result RecoverProvisionallyCommittedSaveData(in SaveDataInfo saveInfo, bool doRollback); Result OpenMultiCommitContext(ref SharedRef contextFileSystem); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/OpenCountFileSystem.cs b/src/LibHac/FsSrv/Impl/OpenCountFileSystem.cs index 82505a6e..caf4e877 100644 --- a/src/LibHac/FsSrv/Impl/OpenCountFileSystem.cs +++ b/src/LibHac/FsSrv/Impl/OpenCountFileSystem.cs @@ -66,4 +66,4 @@ internal class OpenCountFileSystem : ForwardingFileSystem _mountCountSemaphore.Destroy(); base.Dispose(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Impl/ProgramIndexMapInfoManager.cs b/src/LibHac/FsSrv/Impl/ProgramIndexMapInfoManager.cs index c4438f2e..13c540df 100644 --- a/src/LibHac/FsSrv/Impl/ProgramIndexMapInfoManager.cs +++ b/src/LibHac/FsSrv/Impl/ProgramIndexMapInfoManager.cs @@ -53,7 +53,6 @@ public class ProgramIndexMapInfoManager : IDisposable // We skip running ClearImpl() if the allocation failed because we don't need to worry about that in C# return Result.Success; - } /// diff --git a/src/LibHac/FsSrv/Impl/Utility.cs b/src/LibHac/FsSrv/Impl/Utility.cs index 576872a0..d076de1c 100644 --- a/src/LibHac/FsSrv/Impl/Utility.cs +++ b/src/LibHac/FsSrv/Impl/Utility.cs @@ -70,4 +70,4 @@ internal static class Utility Crypto.Sha256.GenerateSha256Hash(SpanHelpers.AsReadOnlyByteSpan(in extraData), hash); return BitConverter.ToInt64(hash); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/MemoryReport.cs b/src/LibHac/FsSrv/MemoryReport.cs index 58c15ac0..14ef840d 100644 --- a/src/LibHac/FsSrv/MemoryReport.cs +++ b/src/LibHac/FsSrv/MemoryReport.cs @@ -7,4 +7,4 @@ public abstract class MemoryReport public abstract long GetRetriedCount(); public abstract long GetAllocateSizeMax(); public abstract void Clear(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs b/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs index 9c5d95de..bd514132 100644 --- a/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs +++ b/src/LibHac/FsSrv/NcaFileSystemServiceImpl.cs @@ -908,13 +908,13 @@ public class NcaFileSystemServiceImpl private static ReadOnlySpan SdCardNintendoRootDirectoryName => // Nintendo new[] { - (byte) 'N', (byte) 'i', (byte) 'n', (byte) 't', (byte) 'e', (byte) 'n', (byte) 'd', (byte) 'o' + (byte)'N', (byte)'i', (byte)'n', (byte)'t', (byte)'e', (byte)'n', (byte)'d', (byte)'o' }; private static ReadOnlySpan ContentStorageDirectoryName => // Contents new[] { - (byte) 'C', (byte) 'o', (byte) 'n', (byte) 't', (byte) 'e', (byte) 'n', (byte) 't', (byte) 's' + (byte)'C', (byte)'o', (byte)'n', (byte)'t', (byte)'e', (byte)'n', (byte)'t', (byte)'s' }; } diff --git a/src/LibHac/FsSrv/SaveDataFileSystemService.cs b/src/LibHac/FsSrv/SaveDataFileSystemService.cs index be0ba656..8f8d2cb5 100644 --- a/src/LibHac/FsSrv/SaveDataFileSystemService.cs +++ b/src/LibHac/FsSrv/SaveDataFileSystemService.cs @@ -14,10 +14,8 @@ using LibHac.Ncm; using LibHac.Os; using LibHac.Sf; using LibHac.Util; - using static LibHac.Fs.SaveData; using static LibHac.Fs.StringTraits; - using IFileSystem = LibHac.Fs.Fsa.IFileSystem; using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem; using IFile = LibHac.Fs.Fsa.IFile; @@ -445,8 +443,8 @@ internal class SaveDataFileSystemService : ISaveDataTransferCoreInterface, ISave canAccess = accessControl.CanCall(OperationType.FindOwnSaveDataWithFilter); bool canAccessDebugSave = accessControl.CanCall(OperationType.DebugSaveData) - && filter.Attribute.Type == SaveDataType.Account - && filter.Attribute.UserId == UserId.InvalidId; + && filter.Attribute.Type == SaveDataType.Account + && filter.Attribute.UserId == UserId.InvalidId; canAccess |= canAccessDebugSave; } @@ -579,7 +577,7 @@ internal class SaveDataFileSystemService : ISaveDataTransferCoreInterface, ISave for (int i = 0; i < Unsafe.SizeOf(); i++) { currentExtraDataBytes[i] = (byte)(extraDataBytes[i] & extraDataMaskBytes[i] | - currentExtraDataBytes[i] & ~extraDataMaskBytes[i]); + currentExtraDataBytes[i] & ~extraDataMaskBytes[i]); } } diff --git a/src/LibHac/FsSrv/SaveDataIndexer.cs b/src/LibHac/FsSrv/SaveDataIndexer.cs index 7f9ab314..748dc909 100644 --- a/src/LibHac/FsSrv/SaveDataIndexer.cs +++ b/src/LibHac/FsSrv/SaveDataIndexer.cs @@ -12,7 +12,6 @@ using LibHac.Kvdb; using LibHac.Os; using LibHac.Sf; using LibHac.Util; - using static LibHac.Fs.SaveData; namespace LibHac.FsSrv; @@ -41,8 +40,8 @@ public class SaveDataIndexer : ISaveDataIndexer private static ReadOnlySpan LastPublishedIdFileName => // lastPublishedId new[] { - (byte) 'l', (byte) 'a', (byte) 's', (byte) 't', (byte) 'P', (byte) 'u', (byte) 'b', (byte) 'l', - (byte) 'i', (byte) 's', (byte) 'h', (byte) 'e', (byte) 'd', (byte) 'I', (byte) 'd' + (byte)'l', (byte)'a', (byte)'s', (byte)'t', (byte)'P', (byte)'u', (byte)'b', (byte)'l', + (byte)'i', (byte)'s', (byte)'h', (byte)'e', (byte)'d', (byte)'I', (byte)'d' }; private static ReadOnlySpan MountDelimiter => // :/ diff --git a/src/LibHac/FsSrv/SaveDataIndexerManager.cs b/src/LibHac/FsSrv/SaveDataIndexerManager.cs index a2aab577..c199a3b5 100644 --- a/src/LibHac/FsSrv/SaveDataIndexerManager.cs +++ b/src/LibHac/FsSrv/SaveDataIndexerManager.cs @@ -234,32 +234,32 @@ internal class SaveDataIndexerManager : ISaveDataIndexerManager, IDisposable private static ReadOnlySpan BisIndexerMountName => new[] { - (byte) 's', (byte) 'a', (byte) 'v', (byte) 'e', (byte) 'D', (byte) 'a', (byte) 't', (byte) 'a', - (byte) 'I', (byte) 'x', (byte) 'r', (byte) 'D', (byte) 'b' + (byte)'s', (byte)'a', (byte)'v', (byte)'e', (byte)'D', (byte)'a', (byte)'t', (byte)'a', + (byte)'I', (byte)'x', (byte)'r', (byte)'D', (byte)'b' }; /// "saveDataIxrDbSd" private static ReadOnlySpan SdCardIndexerMountName => new[] { - (byte) 's', (byte) 'a', (byte) 'v', (byte) 'e', (byte) 'D', (byte) 'a', (byte) 't', (byte) 'a', - (byte) 'I', (byte) 'x', (byte) 'r', (byte) 'D', (byte) 'b', (byte) 'S', (byte) 'd' + (byte)'s', (byte)'a', (byte)'v', (byte)'e', (byte)'D', (byte)'a', (byte)'t', (byte)'a', + (byte)'I', (byte)'x', (byte)'r', (byte)'D', (byte)'b', (byte)'S', (byte)'d' }; /// "saveDataIxrDbPr" private static ReadOnlySpan ProperBisIndexerMountName => new[] { - (byte) 's', (byte) 'a', (byte) 'v', (byte) 'e', (byte) 'D', (byte) 'a', (byte) 't', (byte) 'a', - (byte) 'I', (byte) 'x', (byte) 'r', (byte) 'D', (byte) 'b', (byte) 'P', (byte) 'r' + (byte)'s', (byte)'a', (byte)'v', (byte)'e', (byte)'D', (byte)'a', (byte)'t', (byte)'a', + (byte)'I', (byte)'x', (byte)'r', (byte)'D', (byte)'b', (byte)'P', (byte)'r' }; /// "saveDataIxrDbSf" private static ReadOnlySpan SafeModeIndexerMountName => new[] { - (byte) 's', (byte) 'a', (byte) 'v', (byte) 'e', (byte) 'D', (byte) 'a', (byte) 't', (byte) 'a', - (byte) 'I', (byte) 'x', (byte) 'r', (byte) 'D', (byte) 'b', (byte) 'S', (byte) 'f' + (byte)'s', (byte)'a', (byte)'v', (byte)'e', (byte)'D', (byte)'a', (byte)'t', (byte)'a', + (byte)'I', (byte)'x', (byte)'r', (byte)'D', (byte)'b', (byte)'S', (byte)'f' }; } diff --git a/src/LibHac/FsSrv/SaveDataInfoReaderImpl.cs b/src/LibHac/FsSrv/SaveDataInfoReaderImpl.cs index 346a62fa..c9dbb060 100644 --- a/src/LibHac/FsSrv/SaveDataInfoReaderImpl.cs +++ b/src/LibHac/FsSrv/SaveDataInfoReaderImpl.cs @@ -27,4 +27,4 @@ public interface SaveDataInfoReaderImpl : ISaveDataInfoReader /// The of the operation. Result Read(out long readCount, OutBuffer saveDataInfoBuffer); */ -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/SaveDataSharedFileStorage.cs b/src/LibHac/FsSrv/SaveDataSharedFileStorage.cs index bb176244..918d29b4 100644 --- a/src/LibHac/FsSrv/SaveDataSharedFileStorage.cs +++ b/src/LibHac/FsSrv/SaveDataSharedFileStorage.cs @@ -420,7 +420,6 @@ public class SaveDataFileStorageHolder ref Entry entry = ref currentEntry.ValueRef; _entryList.Remove(currentEntry); entry.Dispose(); - } currentEntry = currentEntry.Next; diff --git a/src/LibHac/FsSrv/Sf/IDirectory.cs b/src/LibHac/FsSrv/Sf/IDirectory.cs index 28000787..4d8bd79a 100644 --- a/src/LibHac/FsSrv/Sf/IDirectory.cs +++ b/src/LibHac/FsSrv/Sf/IDirectory.cs @@ -7,4 +7,4 @@ public interface IDirectory : IDisposable { Result Read(out long entriesRead, OutBuffer entryBuffer); Result GetEntryCount(out long entryCount); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/IEventNotifier.cs b/src/LibHac/FsSrv/Sf/IEventNotifier.cs index b3e25435..39bcf924 100644 --- a/src/LibHac/FsSrv/Sf/IEventNotifier.cs +++ b/src/LibHac/FsSrv/Sf/IEventNotifier.cs @@ -6,4 +6,4 @@ namespace LibHac.FsSrv.Sf; public interface IEventNotifier : IDisposable { Result GetEventHandle(out NativeHandle handle); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/IFile.cs b/src/LibHac/FsSrv/Sf/IFile.cs index 88466e9f..b12edd4e 100644 --- a/src/LibHac/FsSrv/Sf/IFile.cs +++ b/src/LibHac/FsSrv/Sf/IFile.cs @@ -13,4 +13,4 @@ public interface IFile : IDisposable Result GetSize(out long size); Result OperateRange(out QueryRangeInfo rangeInfo, int operationId, long offset, long size); Result OperateRangeWithBuffer(OutBuffer outBuffer, InBuffer inBuffer, int operationId, long offset, long size); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/IFileSystem.cs b/src/LibHac/FsSrv/Sf/IFileSystem.cs index 9eaac0ad..f081caee 100644 --- a/src/LibHac/FsSrv/Sf/IFileSystem.cs +++ b/src/LibHac/FsSrv/Sf/IFileSystem.cs @@ -26,4 +26,4 @@ public interface IFileSystem : IDisposable Result CleanDirectoryRecursively(in Path path); Result GetFileTimeStampRaw(out FileTimeStampRaw timeStamp, in Path path); Result QueryEntry(OutBuffer outBuffer, InBuffer inBuffer, int queryId, in Path path); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/IFileSystemProxyForLoader.cs b/src/LibHac/FsSrv/Sf/IFileSystemProxyForLoader.cs index da531efb..d160d7e9 100644 --- a/src/LibHac/FsSrv/Sf/IFileSystemProxyForLoader.cs +++ b/src/LibHac/FsSrv/Sf/IFileSystemProxyForLoader.cs @@ -13,4 +13,4 @@ public interface IFileSystemProxyForLoader : IDisposable Result IsArchivedProgram(out bool isArchived, ulong processId); Result SetCurrentProcess(ulong processId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/IMultiCommitManager.cs b/src/LibHac/FsSrv/Sf/IMultiCommitManager.cs index 190a4398..aebbb0ca 100644 --- a/src/LibHac/FsSrv/Sf/IMultiCommitManager.cs +++ b/src/LibHac/FsSrv/Sf/IMultiCommitManager.cs @@ -8,4 +8,4 @@ public interface IMultiCommitManager : IDisposable { Result Add(ref SharedRef fileSystem); Result Commit(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataChunkExporter.cs b/src/LibHac/FsSrv/Sf/ISaveDataChunkExporter.cs index 5b90ffe6..55495058 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataChunkExporter.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataChunkExporter.cs @@ -7,4 +7,4 @@ public interface ISaveDataChunkExporter : IDisposable { public Result Pull(out ulong bytesRead, OutBuffer buffer, ulong size); public Result GetRestRawDataSize(out long remainingSize); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataChunkImporter.cs b/src/LibHac/FsSrv/Sf/ISaveDataChunkImporter.cs index 4cfcaef5..f2fe10ca 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataChunkImporter.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataChunkImporter.cs @@ -6,4 +6,4 @@ namespace LibHac.FsSrv.Sf; public interface ISaveDataChunkImporter : IDisposable { public Result Push(InBuffer buffer, ulong size); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataChunkIterator.cs b/src/LibHac/FsSrv/Sf/ISaveDataChunkIterator.cs index 3441454d..9637c521 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataChunkIterator.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataChunkIterator.cs @@ -7,4 +7,4 @@ public interface ISaveDataChunkIterator : IDisposable public Result Next(); public Result IsEnd(out bool isEnd); public Result GetId(out uint chunkId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataDivisionExporter.cs b/src/LibHac/FsSrv/Sf/ISaveDataDivisionExporter.cs index 24d49b74..44dca74a 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataDivisionExporter.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataDivisionExporter.cs @@ -20,4 +20,4 @@ public interface ISaveDataDivisionExporter : IDisposable public Result GetImportInitialDataAad(out InitialDataAad initialDataAad); public Result SetExportInitialDataAad(in InitialDataAad initialDataAad); public Result GetReportInfo(out ExportReportInfo reportInfo); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataDivisionImporter.cs b/src/LibHac/FsSrv/Sf/ISaveDataDivisionImporter.cs index e22afbed..2d7303fd 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataDivisionImporter.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataDivisionImporter.cs @@ -18,4 +18,4 @@ public interface ISaveDataDivisionImporter : IDisposable public Result OpenSaveDataChunkImporter(ref SharedRef outImporter, uint chunkId); public Result GetImportInitialDataAad(out InitialDataAad initialDataAad); public Result GetReportInfo(out ImportReportInfo reportInfo); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataExporter.cs b/src/LibHac/FsSrv/Sf/ISaveDataExporter.cs index 8bd65555..6b5a98b5 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataExporter.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataExporter.cs @@ -10,4 +10,4 @@ public interface ISaveDataExporter : IDisposable public Result GetRestSize(out ulong remainingSize); public Result Pull(out ulong bytesRead, OutBuffer buffer); public Result PullInitialData(OutBuffer initialData); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataImporter.cs b/src/LibHac/FsSrv/Sf/ISaveDataImporter.cs index 05cc6268..f710ebe4 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataImporter.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataImporter.cs @@ -11,4 +11,4 @@ public interface ISaveDataImporter : IDisposable public Result Push(InBuffer buffer); // Can't name the method "Finalize" because it's basically a reserved method in .NET public Result FinalizeImport(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataInfoReader.cs b/src/LibHac/FsSrv/Sf/ISaveDataInfoReader.cs index f8b63101..a304c38d 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataInfoReader.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataInfoReader.cs @@ -21,4 +21,4 @@ public interface ISaveDataInfoReader : IDisposable /// The buffer in which to write the . /// The of the operation. Result Read(out long readCount, OutBuffer saveDataInfoBuffer); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataMover.cs b/src/LibHac/FsSrv/Sf/ISaveDataMover.cs index 165cb3d1..445c8084 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataMover.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataMover.cs @@ -7,4 +7,4 @@ public interface ISaveDataMover : IDisposable Result Register(ulong saveDataId); Result Process(out long remainingSize, long sizeToProcess); Result Cancel(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataTransferManager.cs b/src/LibHac/FsSrv/Sf/ISaveDataTransferManager.cs index 0579874a..6bffdc3e 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataTransferManager.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataTransferManager.cs @@ -11,4 +11,4 @@ public interface ISaveDataTransferManager : IDisposable public Result SetToken(InBuffer token); public Result OpenSaveDataExporter(ref SharedRef outExporter, SaveDataSpaceId spaceId, ulong saveDataId); public Result OpenSaveDataImporter(ref SharedRef outImporter, out long requiredSize, InBuffer initialData, in UserId userId, SaveDataSpaceId spaceId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForRepair.cs b/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForRepair.cs index a81dee5e..f9cdd493 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForRepair.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForRepair.cs @@ -9,4 +9,4 @@ public interface ISaveDataTransferManagerForRepair : IDisposable { public Result OpenSaveDataExporter(ref SharedRef outExporter, SaveDataSpaceId spaceId, ulong saveDataId); public Result OpenSaveDataImporter(ref SharedRef outImporter, InBuffer initialData, SaveDataSpaceId spaceId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForSaveDataRepair.cs b/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForSaveDataRepair.cs index 90f5d10f..5d05bfb1 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForSaveDataRepair.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerForSaveDataRepair.cs @@ -15,4 +15,4 @@ public interface ISaveDataTransferManagerForSaveDataRepair : IDisposable public Result OpenSaveDataImporterForSaveDataBeforeRepair(ref SharedRef outImporter, InBuffer initialData, UserId userId, SaveDataSpaceId spaceId); public Result OpenSaveDataExporterWithKey(ref SharedRef outExporter, in AesKey key, SaveDataSpaceId spaceId, ulong saveDataId); public Result OpenSaveDataImporterWithKey(ref SharedRef outImporter, in AesKey key, InBuffer initialData, UserId userId, ulong saveDataSpaceId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerWithDivision.cs b/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerWithDivision.cs index a84cae2b..41aae313 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerWithDivision.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataTransferManagerWithDivision.cs @@ -20,4 +20,4 @@ public interface ISaveDataTransferManagerWithDivision : IDisposable public Result CancelSuspendingImport(Ncm.ApplicationId applicationId, in UserId userId); public Result CancelSuspendingImportByAttribute(in SaveDataAttribute attribute); public Result SwapSecondary(in SaveDataAttribute attribute, bool doSwap, long primaryCommitId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/ISaveDataTransferProhibiter.cs b/src/LibHac/FsSrv/Sf/ISaveDataTransferProhibiter.cs index 14d86246..3756f3fa 100644 --- a/src/LibHac/FsSrv/Sf/ISaveDataTransferProhibiter.cs +++ b/src/LibHac/FsSrv/Sf/ISaveDataTransferProhibiter.cs @@ -5,4 +5,4 @@ namespace LibHac.FsSrv.Sf; public interface ISaveDataTransferProhibiter : IDisposable { // No methods. Disposing the service object removes the prohibition. -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/IStorage.cs b/src/LibHac/FsSrv/Sf/IStorage.cs index f832c5ff..49989791 100644 --- a/src/LibHac/FsSrv/Sf/IStorage.cs +++ b/src/LibHac/FsSrv/Sf/IStorage.cs @@ -12,4 +12,4 @@ public interface IStorage : IDisposable Result SetSize(long size); Result GetSize(out long size); Result OperateRange(out QueryRangeInfo rangeInfo, int operationId, long offset, long size); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Sf/IWiper.cs b/src/LibHac/FsSrv/Sf/IWiper.cs index b86999e9..38a90b64 100644 --- a/src/LibHac/FsSrv/Sf/IWiper.cs +++ b/src/LibHac/FsSrv/Sf/IWiper.cs @@ -6,4 +6,4 @@ public interface IWiper : IDisposable { public Result Startup(out long spaceToWipe); public Result Process(out long remainingSpaceToWipe); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Storage/IStorageDeviceManagerFactory.cs b/src/LibHac/FsSrv/Storage/IStorageDeviceManagerFactory.cs index eb5a3e75..ed631286 100644 --- a/src/LibHac/FsSrv/Storage/IStorageDeviceManagerFactory.cs +++ b/src/LibHac/FsSrv/Storage/IStorageDeviceManagerFactory.cs @@ -10,4 +10,4 @@ public interface IStorageDeviceManagerFactory : IDisposable Result Create(ref SharedRef outDeviceManager, StorageDevicePortId portId); Result SetReady(StorageDevicePortId portId, NativeHandle handle); Result UnsetReady(StorageDevicePortId portId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceManager.cs b/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceManager.cs index b9bf8bce..1564a270 100644 --- a/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceManager.cs +++ b/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceManager.cs @@ -14,4 +14,4 @@ public interface IStorageDeviceManager : IDisposable Result OpenDevice(ref SharedRef outStorageDevice, ulong attribute); Result OpenStorage(ref SharedRef outStorage, ulong attribute); Result Invalidate(); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceOperator.cs b/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceOperator.cs index 974b6271..1a56f5da 100644 --- a/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceOperator.cs +++ b/src/LibHac/FsSrv/Storage/Sf/IStorageDeviceOperator.cs @@ -11,4 +11,4 @@ public interface IStorageDeviceOperator : IDisposable Result OperateOut2(out long bytesWrittenBuffer1, OutBuffer buffer1, out long bytesWrittenBuffer2, OutBuffer buffer2, int operationId); Result OperateInOut(out long bytesWritten, OutBuffer outBuffer, InBuffer inBuffer, long offset, long size, int operationId); Result OperateIn2Out(out long bytesWritten, OutBuffer outBuffer, InBuffer inBuffer1, InBuffer inBuffer2, long offset, long size, int operationId); -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Storage/StorageDeviceManagerFactory.cs b/src/LibHac/FsSrv/Storage/StorageDeviceManagerFactory.cs index 11523b29..d19650c5 100644 --- a/src/LibHac/FsSrv/Storage/StorageDeviceManagerFactory.cs +++ b/src/LibHac/FsSrv/Storage/StorageDeviceManagerFactory.cs @@ -48,4 +48,4 @@ internal static class StorageDeviceManagerFactory g.Factory = factory; return g.Factory; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSrv/Storage/StorageDevicePortId.cs b/src/LibHac/FsSrv/Storage/StorageDevicePortId.cs index b9c591de..7d13df8b 100644 --- a/src/LibHac/FsSrv/Storage/StorageDevicePortId.cs +++ b/src/LibHac/FsSrv/Storage/StorageDevicePortId.cs @@ -6,4 +6,4 @@ public enum StorageDevicePortId : byte Mmc = 1, SdCard = 2, GameCard = 3 -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/BucketTreeBuilder.cs b/src/LibHac/FsSystem/BucketTreeBuilder.cs index a921e5a7..99cea147 100644 --- a/src/LibHac/FsSystem/BucketTreeBuilder.cs +++ b/src/LibHac/FsSystem/BucketTreeBuilder.cs @@ -311,4 +311,4 @@ public partial class BucketTree return Result.Success; } } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/BufferedStorage.cs b/src/LibHac/FsSystem/BufferedStorage.cs index fa677f02..da8be731 100644 --- a/src/LibHac/FsSystem/BufferedStorage.cs +++ b/src/LibHac/FsSystem/BufferedStorage.cs @@ -7,7 +7,6 @@ using LibHac.Fs; using LibHac.FsSystem.Buffers; using LibHac.Os; using LibHac.Util; - using Buffer = LibHac.Mem.Buffer; using CacheHandle = System.UInt64; @@ -882,7 +881,6 @@ public class BufferedStorage : IStorage using var lk = new ScopedLock(ref _bufferedStorage._mutex); _cache.Value.UnprepareFetch(); - } } @@ -1693,6 +1691,7 @@ public class BufferedStorage : IStorage } } } + cache.Write(currentOffset, currentSource.Slice(0, currentSize)); BufferManagerUtility.EnableBlockingBufferManagerAllocation(); diff --git a/src/LibHac/FsSystem/Buffers/BufferManagerUtility.cs b/src/LibHac/FsSystem/Buffers/BufferManagerUtility.cs index 1491d584..c83f3aa0 100644 --- a/src/LibHac/FsSystem/Buffers/BufferManagerUtility.cs +++ b/src/LibHac/FsSystem/Buffers/BufferManagerUtility.cs @@ -140,4 +140,4 @@ internal static class BufferManagerUtility outBuffer = tempBuffer; return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/Buffers/FileSystemBuddyHeap.cs b/src/LibHac/FsSystem/Buffers/FileSystemBuddyHeap.cs index 5c88d26f..e9c9699c 100644 --- a/src/LibHac/FsSystem/Buffers/FileSystemBuddyHeap.cs +++ b/src/LibHac/FsSystem/Buffers/FileSystemBuddyHeap.cs @@ -644,4 +644,4 @@ public unsafe class FileSystemBuddyHeap : IDisposable void* pointer = Unsafe.AsPointer(ref MemoryMarshal.GetReference(buffer.Span)); Free(pointer, order); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/Buffers/FileSystemBufferManager.cs b/src/LibHac/FsSystem/Buffers/FileSystemBufferManager.cs index 1a015dce..9fd1c844 100644 --- a/src/LibHac/FsSystem/Buffers/FileSystemBufferManager.cs +++ b/src/LibHac/FsSystem/Buffers/FileSystemBufferManager.cs @@ -7,7 +7,6 @@ using LibHac.Diag; using LibHac.Fs; using LibHac.Os; using LibHac.Util; - using Buffer = LibHac.Mem.Buffer; using CacheHandle = System.UInt64; diff --git a/src/LibHac/FsSystem/CompressedStorage.cs b/src/LibHac/FsSystem/CompressedStorage.cs index 82ae8df1..c68764ed 100644 --- a/src/LibHac/FsSystem/CompressedStorage.cs +++ b/src/LibHac/FsSystem/CompressedStorage.cs @@ -5,7 +5,6 @@ using LibHac.Diag; using LibHac.Fs; using LibHac.FsSystem.Impl; using LibHac.Os; - using Buffer = LibHac.Mem.Buffer; using CacheHandle = System.UInt64; @@ -310,7 +309,6 @@ public class CompressedStorage : IStorage, IAsynchronousAccessSplitter if (res.IsFailure()) return res.Miss(); return Result.Success; - } public void FinalizeObject() diff --git a/src/LibHac/FsSystem/IUniqueLock.cs b/src/LibHac/FsSystem/IUniqueLock.cs index 4f98579f..c4669ac5 100644 --- a/src/LibHac/FsSystem/IUniqueLock.cs +++ b/src/LibHac/FsSystem/IUniqueLock.cs @@ -27,4 +27,4 @@ public class UniqueLockWithPin : IUniqueLock where T : class, IDisposable _pinnedObject.Destroy(); _semaphore.Dispose(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/Impl/PartitionFileSystemFormats.cs b/src/LibHac/FsSystem/Impl/PartitionFileSystemFormats.cs index 13fbcdc8..f9c308af 100644 --- a/src/LibHac/FsSystem/Impl/PartitionFileSystemFormats.cs +++ b/src/LibHac/FsSystem/Impl/PartitionFileSystemFormats.cs @@ -35,4 +35,4 @@ public struct HashedEntry : IPartitionFileSystemEntry long IPartitionFileSystemEntry.Offset => Offset; long IPartitionFileSystemEntry.Size => Size; int IPartitionFileSystemEntry.NameOffset => NameOffset; -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/Impl/TargetLockedAvoidance.cs b/src/LibHac/FsSystem/Impl/TargetLockedAvoidance.cs index b0840d54..62f3579b 100644 --- a/src/LibHac/FsSystem/Impl/TargetLockedAvoidance.cs +++ b/src/LibHac/FsSystem/Impl/TargetLockedAvoidance.cs @@ -31,4 +31,4 @@ internal static class TargetLockedAvoidance return res; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/NcaReader.cs b/src/LibHac/FsSystem/NcaReader.cs index d5b7af12..02c8e8fc 100644 --- a/src/LibHac/FsSystem/NcaReader.cs +++ b/src/LibHac/FsSystem/NcaReader.cs @@ -395,7 +395,7 @@ public class NcaReader : IDisposable for (int i = 0; i < (int)NcaHeader.DecryptionKey.Count; i++) { if (!CryptoUtil.IsSameBytes(zeroKey, - _header.EncryptedKeys.ItemsRo.Slice(i * Aes.KeySize128, Aes.KeySize128), Aes.KeySize128)) + _header.EncryptedKeys.ItemsRo.Slice(i * Aes.KeySize128, Aes.KeySize128), Aes.KeySize128)) { return true; } diff --git a/src/LibHac/FsSystem/PartitionFile.cs b/src/LibHac/FsSystem/PartitionFile.cs index 487193ed..8344bfd0 100644 --- a/src/LibHac/FsSystem/PartitionFile.cs +++ b/src/LibHac/FsSystem/PartitionFile.cs @@ -86,4 +86,4 @@ public class PartitionFile : IFile return ResultFs.UnsupportedWriteForPartitionFile.Log(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/PartitionFileSystemMetaCore.cs b/src/LibHac/FsSystem/PartitionFileSystemMetaCore.cs index 014be34a..a01d1022 100644 --- a/src/LibHac/FsSystem/PartitionFileSystemMetaCore.cs +++ b/src/LibHac/FsSystem/PartitionFileSystemMetaCore.cs @@ -191,4 +191,4 @@ public class PartitionFileSystemMetaCore where T : unmanaged, IPartitionFileS public int EntryCount; public int StringTableSize; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/ReadOnlyBlockCacheStorage.cs b/src/LibHac/FsSystem/ReadOnlyBlockCacheStorage.cs index ddeabe34..1142b335 100644 --- a/src/LibHac/FsSystem/ReadOnlyBlockCacheStorage.cs +++ b/src/LibHac/FsSystem/ReadOnlyBlockCacheStorage.cs @@ -5,7 +5,6 @@ using LibHac.Diag; using LibHac.Fs; using LibHac.Os; using LibHac.Util; - using BlockCache = LibHac.FsSystem.LruListCache>; namespace LibHac.FsSystem; diff --git a/src/LibHac/FsSystem/SemaphoreAdapter.cs b/src/LibHac/FsSystem/SemaphoreAdapter.cs index 4995b860..5d28549b 100644 --- a/src/LibHac/FsSystem/SemaphoreAdapter.cs +++ b/src/LibHac/FsSystem/SemaphoreAdapter.cs @@ -32,4 +32,4 @@ public class SemaphoreAdapter : IDisposable, ILockable { _semaphore?.Dispose(); } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/ThreadPriorityChanger.cs b/src/LibHac/FsSystem/ThreadPriorityChanger.cs index 7c148970..082ea3d9 100644 --- a/src/LibHac/FsSystem/ThreadPriorityChanger.cs +++ b/src/LibHac/FsSystem/ThreadPriorityChanger.cs @@ -47,4 +47,4 @@ public struct ScopedThreadPriorityChangerByAccessPriority : IDisposable { return 0; } -} +} \ No newline at end of file diff --git a/src/LibHac/FsSystem/ValueStringBuilder.cs b/src/LibHac/FsSystem/ValueStringBuilder.cs index f17fe9a4..b6738569 100644 --- a/src/LibHac/FsSystem/ValueStringBuilder.cs +++ b/src/LibHac/FsSystem/ValueStringBuilder.cs @@ -67,6 +67,7 @@ internal ref struct ValueStringBuilder EnsureCapacity(Length + 1); _chars[Length] = '\0'; } + return ref MemoryMarshal.GetReference(_chars); } @@ -100,6 +101,7 @@ internal ref struct ValueStringBuilder EnsureCapacity(Length + 1); _chars[Length] = '\0'; } + return _chars.Slice(0, _pos); } @@ -205,6 +207,7 @@ internal ref struct ValueStringBuilder { dst[i] = c; } + _pos += count; } @@ -267,4 +270,4 @@ internal ref struct ValueStringBuilder ArrayPool.Shared.Return(toReturn); } } -} +} \ No newline at end of file diff --git a/src/LibHac/GcSrv/IGameCardDeviceManager.cs b/src/LibHac/GcSrv/IGameCardDeviceManager.cs index ceb129b4..99479d73 100644 --- a/src/LibHac/GcSrv/IGameCardDeviceManager.cs +++ b/src/LibHac/GcSrv/IGameCardDeviceManager.cs @@ -11,4 +11,4 @@ internal interface IGameCardDeviceManager Result HandleGameCardAccessResult(Result result); Result GetHandle(out uint handle); bool IsSecureMode(); -} +} \ No newline at end of file diff --git a/src/LibHac/GcSrv/IGameCardKeyManager.cs b/src/LibHac/GcSrv/IGameCardKeyManager.cs index 4cba4440..a2b38bbd 100644 --- a/src/LibHac/GcSrv/IGameCardKeyManager.cs +++ b/src/LibHac/GcSrv/IGameCardKeyManager.cs @@ -5,4 +5,4 @@ namespace LibHac.GcSrv; public interface IGameCardKeyManager { void PresetInternalKeys(ReadOnlySpan gameCardKey, ReadOnlySpan gameCardCertificate); -} +} \ No newline at end of file diff --git a/src/LibHac/HorizonClient.cs b/src/LibHac/HorizonClient.cs index 92a1a289..75046122 100644 --- a/src/LibHac/HorizonClient.cs +++ b/src/LibHac/HorizonClient.cs @@ -47,4 +47,4 @@ public class HorizonClient : IDisposable { return new ArpClient(this); } -} +} \ No newline at end of file diff --git a/src/LibHac/HorizonConfiguration.cs b/src/LibHac/HorizonConfiguration.cs index 463c1174..dbbe92b1 100644 --- a/src/LibHac/HorizonConfiguration.cs +++ b/src/LibHac/HorizonConfiguration.cs @@ -13,4 +13,4 @@ public class HorizonConfiguration /// If , a default is used. /// public ITickGenerator? TickGenerator { get; set; } -} +} \ No newline at end of file diff --git a/src/LibHac/Kernel/IniExtract.cs b/src/LibHac/Kernel/IniExtract.cs index 6c2f3861..5f6fc59a 100644 --- a/src/LibHac/Kernel/IniExtract.cs +++ b/src/LibHac/Kernel/IniExtract.cs @@ -96,4 +96,4 @@ public static class IniExtract public uint InitArrayStartOffset; public uint InitArrayEndOffset; } -} +} \ No newline at end of file diff --git a/src/LibHac/Kernel/KipReader.cs b/src/LibHac/Kernel/KipReader.cs index 792616dc..8d42bc16 100644 --- a/src/LibHac/Kernel/KipReader.cs +++ b/src/LibHac/Kernel/KipReader.cs @@ -289,6 +289,7 @@ public class KipReader : IDisposable // Copy directly. data[--outOffset] = data[--inOffset]; } + control <<= 1; if (outOffset == 0) @@ -308,4 +309,4 @@ public class KipReader : IDisposable Reserved1 = 4, Reserved2 = 5 } -} +} \ No newline at end of file diff --git a/src/LibHac/Kvdb/AutoBuffer.cs b/src/LibHac/Kvdb/AutoBuffer.cs index 48012ae6..bda603cc 100644 --- a/src/LibHac/Kvdb/AutoBuffer.cs +++ b/src/LibHac/Kvdb/AutoBuffer.cs @@ -32,4 +32,4 @@ internal struct AutoBuffer : IDisposable _memoryResource.Deallocate(ref _buffer, Alignment); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Kvdb/BoundedString.cs b/src/LibHac/Kvdb/BoundedString.cs index 3a3f24f5..d48afe6c 100644 --- a/src/LibHac/Kvdb/BoundedString.cs +++ b/src/LibHac/Kvdb/BoundedString.cs @@ -17,4 +17,4 @@ public struct BoundedString where TSize : unmanaged } [StructLayout(LayoutKind.Sequential, Size = 768)] -internal struct Size768 { } +internal struct Size768 { } \ No newline at end of file diff --git a/src/LibHac/Kvdb/FlatMapKeyValueStore.cs b/src/LibHac/Kvdb/FlatMapKeyValueStore.cs index f7ec5ce0..1f09997c 100644 --- a/src/LibHac/Kvdb/FlatMapKeyValueStore.cs +++ b/src/LibHac/Kvdb/FlatMapKeyValueStore.cs @@ -27,8 +27,8 @@ public class FlatMapKeyValueStore : IDisposable where TKey : unmanaged, IE private static ReadOnlySpan ArchiveFileName => // /imkvdb.arc new[] { - (byte) '/', (byte) 'i', (byte) 'm', (byte) 'k', (byte) 'v', (byte) 'd', (byte) 'b', (byte) '.', - (byte) 'a', (byte) 'r', (byte) 'c' + (byte)'/', (byte)'i', (byte)'m', (byte)'k', (byte)'v', (byte)'d', (byte)'b', (byte)'.', + (byte)'a', (byte)'r', (byte)'c' }; public int Count => _index.Count; @@ -726,4 +726,4 @@ public class FlatMapKeyValueStore : IDisposable where TKey : unmanaged, IE public void Next() => _index++; public bool IsEnd() => _index == _length; } -} +} \ No newline at end of file diff --git a/src/LibHac/Kvdb/KeyValueArchive.cs b/src/LibHac/Kvdb/KeyValueArchive.cs index 45a19656..936740fb 100644 --- a/src/LibHac/Kvdb/KeyValueArchive.cs +++ b/src/LibHac/Kvdb/KeyValueArchive.cs @@ -174,7 +174,7 @@ internal ref struct KeyValueArchiveBufferWriter { // Bounds check. Abort.DoAbortUnless(_offset + source.Length <= _buffer.Length && - _offset + source.Length > _offset); + _offset + source.Length > _offset); source.CopyTo(_buffer.Slice(_offset)); _offset += source.Length; diff --git a/src/LibHac/Loader/MetaLoader.cs b/src/LibHac/Loader/MetaLoader.cs index 9b613050..b2998d18 100644 --- a/src/LibHac/Loader/MetaLoader.cs +++ b/src/LibHac/Loader/MetaLoader.cs @@ -231,4 +231,4 @@ public class MetaLoader return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/Loader/Types.cs b/src/LibHac/Loader/Types.cs index b8c7fd03..a48a41e7 100644 --- a/src/LibHac/Loader/Types.cs +++ b/src/LibHac/Loader/Types.cs @@ -2,6 +2,7 @@ using LibHac.Common; using LibHac.Common.FixedArrays; using LibHac.Ncm; + #pragma warning disable 169 // Unused private fields namespace LibHac.Loader; diff --git a/src/LibHac/Lr/AddOnContentLocationResolver.cs b/src/LibHac/Lr/AddOnContentLocationResolver.cs index fa84d8d3..6758e624 100644 --- a/src/LibHac/Lr/AddOnContentLocationResolver.cs +++ b/src/LibHac/Lr/AddOnContentLocationResolver.cs @@ -33,4 +33,4 @@ public class AddOnContentLocationResolver : IDisposable public Result UnregisterApplicationAddOnContent(Ncm.ApplicationId id) => _interface.Get.UnregisterApplicationAddOnContent(id); -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/IAddOnContentLocationResolver.cs b/src/LibHac/Lr/IAddOnContentLocationResolver.cs index a8a0c440..e4d46606 100644 --- a/src/LibHac/Lr/IAddOnContentLocationResolver.cs +++ b/src/LibHac/Lr/IAddOnContentLocationResolver.cs @@ -11,4 +11,4 @@ public interface IAddOnContentLocationResolver : IDisposable Result UnregisterAllAddOnContentPath(); Result RefreshApplicationAddOnContent(InArray ids); Result UnregisterApplicationAddOnContent(Ncm.ApplicationId id); -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/ILocationResolver.cs b/src/LibHac/Lr/ILocationResolver.cs index 2e2f625d..ddbf955c 100644 --- a/src/LibHac/Lr/ILocationResolver.cs +++ b/src/LibHac/Lr/ILocationResolver.cs @@ -26,4 +26,4 @@ public interface ILocationResolver : IDisposable Result RedirectProgramPathForDebug(in Path path, ProgramId id); Result RedirectApplicationProgramPathForDebug(in Path path, ProgramId id, ProgramId ownerId); Result EraseProgramRedirectionForDebug(ProgramId id); -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/ILocationResolverManager.cs b/src/LibHac/Lr/ILocationResolverManager.cs index 2ef6e5d2..04f4240b 100644 --- a/src/LibHac/Lr/ILocationResolverManager.cs +++ b/src/LibHac/Lr/ILocationResolverManager.cs @@ -10,4 +10,4 @@ public interface ILocationResolverManager : IDisposable Result OpenRegisteredLocationResolver(ref SharedRef outResolver); Result RefreshLocationResolver(StorageId storageId); Result OpenAddOnContentLocationResolver(ref SharedRef outResolver); -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/IRegisteredLocationResolver.cs b/src/LibHac/Lr/IRegisteredLocationResolver.cs index 91756ecc..95c2665f 100644 --- a/src/LibHac/Lr/IRegisteredLocationResolver.cs +++ b/src/LibHac/Lr/IRegisteredLocationResolver.cs @@ -15,4 +15,4 @@ public interface IRegisteredLocationResolver : IDisposable Result RedirectHtmlDocumentPath(in Path path, ProgramId id); Result Refresh(); Result RefreshExcluding(ReadOnlySpan ids); -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/LocationResolver.cs b/src/LibHac/Lr/LocationResolver.cs index 50cbf33d..7f88c6c8 100644 --- a/src/LibHac/Lr/LocationResolver.cs +++ b/src/LibHac/Lr/LocationResolver.cs @@ -78,4 +78,4 @@ public class LocationResolver : IDisposable public Result EraseProgramRedirectionForDebug(ProgramId id) => _interface.Get.EraseProgramRedirectionForDebug(id); -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/LrClient.cs b/src/LibHac/Lr/LrClient.cs index d6955346..f6789c3a 100644 --- a/src/LibHac/Lr/LrClient.cs +++ b/src/LibHac/Lr/LrClient.cs @@ -35,4 +35,4 @@ internal struct LrClientGlobals : IDisposable { LrService.Dispose(); } -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/LrService.cs b/src/LibHac/Lr/LrService.cs index c9259b19..0af069c6 100644 --- a/src/LibHac/Lr/LrService.cs +++ b/src/LibHac/Lr/LrService.cs @@ -98,4 +98,4 @@ public static class LrService return SharedRef.CreateMove(ref manager.Ref()); } -} +} \ No newline at end of file diff --git a/src/LibHac/Lr/RegisteredLocationResolver.cs b/src/LibHac/Lr/RegisteredLocationResolver.cs index c79ee901..1e2b7c1d 100644 --- a/src/LibHac/Lr/RegisteredLocationResolver.cs +++ b/src/LibHac/Lr/RegisteredLocationResolver.cs @@ -25,7 +25,7 @@ public class RegisteredLocationResolver : IDisposable _interface.Get.RegisterProgramPath(in path, id, ownerId); public Result UnregisterProgramPath(ProgramId id) => - _interface.Get.UnregisterProgramPath(id); + _interface.Get.UnregisterProgramPath(id); public Result RedirectProgramPath(in Path path, ProgramId id, ProgramId ownerId) => _interface.Get.RedirectProgramPath(in path, id, ownerId); @@ -47,4 +47,4 @@ public class RegisteredLocationResolver : IDisposable public Result RefreshExcluding(ReadOnlySpan ids) => _interface.Get.RefreshExcluding(ids); -} +} \ No newline at end of file diff --git a/src/LibHac/MemoryResource.cs b/src/LibHac/MemoryResource.cs index 7789d853..b545b9be 100644 --- a/src/LibHac/MemoryResource.cs +++ b/src/LibHac/MemoryResource.cs @@ -57,4 +57,4 @@ public class ArrayPoolMemoryResource : MemoryResource { return ReferenceEquals(this, other); } -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/ContentMetaId.cs b/src/LibHac/Ncm/ContentMetaId.cs index 85b5fa1e..86c7191f 100644 --- a/src/LibHac/Ncm/ContentMetaId.cs +++ b/src/LibHac/Ncm/ContentMetaId.cs @@ -53,4 +53,4 @@ public readonly struct DeltaId } public static implicit operator ProgramId(DeltaId id) => new ProgramId(id.Value); -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/ContentMetaKey.cs b/src/LibHac/Ncm/ContentMetaKey.cs index b93fc47f..54941b22 100644 --- a/src/LibHac/Ncm/ContentMetaKey.cs +++ b/src/LibHac/Ncm/ContentMetaKey.cs @@ -72,4 +72,4 @@ public class ContentMetaKey : IComparable, IComparable, IEquatab if (obj is null) return 1; return obj is ContentMetaKey other ? CompareTo(other) : throw new ArgumentException($"Object must be of type {nameof(ContentMetaKey)}"); } -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/ContentMetaStructs.cs b/src/LibHac/Ncm/ContentMetaStructs.cs index 28180315..55b10f17 100644 --- a/src/LibHac/Ncm/ContentMetaStructs.cs +++ b/src/LibHac/Ncm/ContentMetaStructs.cs @@ -16,4 +16,4 @@ public class ApplicationContentMetaKey { public ContentMetaKey Key { get; set; } public ulong TitleId { get; set; } -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/DataId.cs b/src/LibHac/Ncm/DataId.cs index 0d5e8b0c..cec0e0e8 100644 --- a/src/LibHac/Ncm/DataId.cs +++ b/src/LibHac/Ncm/DataId.cs @@ -28,4 +28,4 @@ public readonly struct DataId : IEquatable, IComparable public static bool operator >(DataId left, DataId right) => left.CompareTo(right) > 0; public static bool operator <=(DataId left, DataId right) => left.CompareTo(right) <= 0; public static bool operator >=(DataId left, DataId right) => left.CompareTo(right) >= 0; -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/IContentMetaDatabase.cs b/src/LibHac/Ncm/IContentMetaDatabase.cs index f1a08ed2..d6692a66 100644 --- a/src/LibHac/Ncm/IContentMetaDatabase.cs +++ b/src/LibHac/Ncm/IContentMetaDatabase.cs @@ -28,4 +28,4 @@ public interface IContentMetaDatabase Result GetAttributes(out ContentMetaAttribute attributes, ContentMetaKey key); Result GetRequiredApplicationVersion(out int version, ContentMetaKey key); //Result GetContentIdByTypeAndIdOffset(out ContentId contentId, ContentMetaKey key, ContentType type, byte idOffset); -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/IContentStorage.cs b/src/LibHac/Ncm/IContentStorage.cs index aa4eb798..f910944a 100644 --- a/src/LibHac/Ncm/IContentStorage.cs +++ b/src/LibHac/Ncm/IContentStorage.cs @@ -33,4 +33,4 @@ public interface IContentStorage //Result GetSizeFromPlaceHolderId(out long size, PlaceHolderId placeHolderId); //Result RepairInvalidFileAttribute(); //Result GetRightsIdFromPlaceHolderIdWithCache(out RightsId rightsId, out byte keyGeneration, PlaceHolderId placeHolderId, out ContentId cacheContentId); -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/ProgramId.cs b/src/LibHac/Ncm/ProgramId.cs index 09fbe259..c1376a25 100644 --- a/src/LibHac/Ncm/ProgramId.cs +++ b/src/LibHac/Ncm/ProgramId.cs @@ -28,4 +28,4 @@ public readonly struct ProgramId : IEquatable, IComparable public static bool operator >(ProgramId left, ProgramId right) => left.CompareTo(right) > 0; public static bool operator <=(ProgramId left, ProgramId right) => left.CompareTo(right) <= 0; public static bool operator >=(ProgramId left, ProgramId right) => left.CompareTo(right) >= 0; -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/ProgramLocation.cs b/src/LibHac/Ncm/ProgramLocation.cs index e24f01a1..20c7d036 100644 --- a/src/LibHac/Ncm/ProgramLocation.cs +++ b/src/LibHac/Ncm/ProgramLocation.cs @@ -10,4 +10,4 @@ public readonly struct ProgramLocation ProgramId = programId; StorageId = storageId; } -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/StorageId.cs b/src/LibHac/Ncm/StorageId.cs index 5e99563f..9a067e30 100644 --- a/src/LibHac/Ncm/StorageId.cs +++ b/src/LibHac/Ncm/StorageId.cs @@ -8,4 +8,4 @@ public enum StorageId : byte BuiltInSystem = 3, BuiltInUser = 4, SdCard = 5 -} +} \ No newline at end of file diff --git a/src/LibHac/Ncm/SystemContentMetaId.cs b/src/LibHac/Ncm/SystemContentMetaId.cs index b588e1c0..0b54e595 100644 --- a/src/LibHac/Ncm/SystemContentMetaId.cs +++ b/src/LibHac/Ncm/SystemContentMetaId.cs @@ -331,4 +331,4 @@ public readonly struct SystemApplicationId } public static implicit operator ProgramId(SystemApplicationId id) => new ProgramId(id.Value); -} +} \ No newline at end of file diff --git a/src/LibHac/Os/ConditionVariable.cs b/src/LibHac/Os/ConditionVariable.cs index 5dd71b87..10625e5b 100644 --- a/src/LibHac/Os/ConditionVariable.cs +++ b/src/LibHac/Os/ConditionVariable.cs @@ -4,4 +4,4 @@ public enum ConditionVariableStatus { TimedOut = 0, Success = 1 -} +} \ No newline at end of file diff --git a/src/LibHac/Os/ILockable.cs b/src/LibHac/Os/ILockable.cs index 11b42025..3bd0322b 100644 --- a/src/LibHac/Os/ILockable.cs +++ b/src/LibHac/Os/ILockable.cs @@ -16,4 +16,4 @@ public interface ISharedMutex : ILockable void LockShared(); bool TryLockShared(); void UnlockShared(); -} +} \ No newline at end of file diff --git a/src/LibHac/Os/ITickGenerator.cs b/src/LibHac/Os/ITickGenerator.cs index 975821d0..6b906bfa 100644 --- a/src/LibHac/Os/ITickGenerator.cs +++ b/src/LibHac/Os/ITickGenerator.cs @@ -20,4 +20,4 @@ internal class DefaultTickGenerator : ITickGenerator { return new Tick(Stopwatch.GetTimestamp() - _initialTick); } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Impl/MultipleWaitImpl.cs b/src/LibHac/Os/Impl/MultipleWaitImpl.cs index d8cdd536..6db31ecc 100644 --- a/src/LibHac/Os/Impl/MultipleWaitImpl.cs +++ b/src/LibHac/Os/Impl/MultipleWaitImpl.cs @@ -241,6 +241,7 @@ public class MultiWaitImpl : IDisposable outHolder = null; return waitResult; } + break; case WaitCancelled: { diff --git a/src/LibHac/Os/Impl/OsResourceManager.cs b/src/LibHac/Os/Impl/OsResourceManager.cs index 3c707bfb..d14da85f 100644 --- a/src/LibHac/Os/Impl/OsResourceManager.cs +++ b/src/LibHac/Os/Impl/OsResourceManager.cs @@ -24,4 +24,4 @@ internal static class OsResourceManagerApi { return os.ResourceManager; } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Impl/ReaderWriterLockImpl-os.net.cs b/src/LibHac/Os/Impl/ReaderWriterLockImpl-os.net.cs index 176bbbef..2aa95a58 100644 --- a/src/LibHac/Os/Impl/ReaderWriterLockImpl-os.net.cs +++ b/src/LibHac/Os/Impl/ReaderWriterLockImpl-os.net.cs @@ -208,4 +208,4 @@ internal static partial class ReaderWriterLockImpl rwLock.CvReadLockWaiter.Broadcast(); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Impl/ReaderWriterLockImpl.cs b/src/LibHac/Os/Impl/ReaderWriterLockImpl.cs index 86f39654..9e5d0ae1 100644 --- a/src/LibHac/Os/Impl/ReaderWriterLockImpl.cs +++ b/src/LibHac/Os/Impl/ReaderWriterLockImpl.cs @@ -124,4 +124,4 @@ internal static partial class ReaderWriterLockImpl { lc.Counter.WriteLocked = 1; } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Impl/TickManager-os.net.cs b/src/LibHac/Os/Impl/TickManager-os.net.cs index cde07bcf..f161d9e0 100644 --- a/src/LibHac/Os/Impl/TickManager-os.net.cs +++ b/src/LibHac/Os/Impl/TickManager-os.net.cs @@ -55,4 +55,4 @@ internal struct TickManagerImpl : IDisposable [DllImport("winmm.dll", EntryPoint = "timeEndPeriod")] private static extern uint TimeEndPeriod(uint milliseconds); -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Impl/TickManager.cs b/src/LibHac/Os/Impl/TickManager.cs index 4e6d77e2..219ce3b4 100644 --- a/src/LibHac/Os/Impl/TickManager.cs +++ b/src/LibHac/Os/Impl/TickManager.cs @@ -104,7 +104,7 @@ public class TickManager : IDisposable // Calculate the tick, and invert back to negative if needed. long ticks = (seconds * tickFreq) + - ((frac * tickFreq + nanoSecondsPerSecond - 1) / nanoSecondsPerSecond); + ((frac * tickFreq + nanoSecondsPerSecond - 1) / nanoSecondsPerSecond); if (isNegative) { @@ -114,4 +114,4 @@ public class TickManager : IDisposable return new Tick(ticks); } } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Impl/TimeoutHelper-os.net.cs b/src/LibHac/Os/Impl/TimeoutHelper-os.net.cs index 2eb8e8ad..7903272f 100644 --- a/src/LibHac/Os/Impl/TimeoutHelper-os.net.cs +++ b/src/LibHac/Os/Impl/TimeoutHelper-os.net.cs @@ -41,4 +41,4 @@ internal static class TimeoutHelperImpl long timeMs = Math.Min(int.MaxValue, ts.GetMilliSeconds()); return TimeSpan.FromMilliSeconds(timeMs); } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Impl/TimeoutHelper.cs b/src/LibHac/Os/Impl/TimeoutHelper.cs index 7b66b697..a413fbe0 100644 --- a/src/LibHac/Os/Impl/TimeoutHelper.cs +++ b/src/LibHac/Os/Impl/TimeoutHelper.cs @@ -58,4 +58,4 @@ internal readonly struct TimeoutHelper { TimeoutHelperImpl.Sleep(os, timeout); } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/NativeHandle.cs b/src/LibHac/Os/NativeHandle.cs index e91736ba..b6f17912 100644 --- a/src/LibHac/Os/NativeHandle.cs +++ b/src/LibHac/Os/NativeHandle.cs @@ -6,4 +6,4 @@ public static class NativeHandleApi { } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/ProcessId.cs b/src/LibHac/Os/ProcessId.cs index 3e083264..0ad0dd14 100644 --- a/src/LibHac/Os/ProcessId.cs +++ b/src/LibHac/Os/ProcessId.cs @@ -7,4 +7,4 @@ public readonly struct ProcessId public readonly ulong Value; public ProcessId(ulong value) => Value = value; -} +} \ No newline at end of file diff --git a/src/LibHac/Os/ReaderWriterLock.cs b/src/LibHac/Os/ReaderWriterLock.cs index 45dfda8b..965b3ccd 100644 --- a/src/LibHac/Os/ReaderWriterLock.cs +++ b/src/LibHac/Os/ReaderWriterLock.cs @@ -80,7 +80,6 @@ public static class ReaderWriterLockApi { Assert.SdkRequires(rwLock.LockState == ReaderWriterLockType.State.Initialized); return ReaderWriterLockImpl.GetReadLockCount(in ReaderWriterLockImpl.GetLockCountRo(in rwLock)) != 0; - } // Todo: Use Horizon thread APIs diff --git a/src/LibHac/Os/ReaderWriterLockTypes.cs b/src/LibHac/Os/ReaderWriterLockTypes.cs index 9d1e1f34..6b979517 100644 --- a/src/LibHac/Os/ReaderWriterLockTypes.cs +++ b/src/LibHac/Os/ReaderWriterLockTypes.cs @@ -60,4 +60,4 @@ public struct ReaderWriterLockType private static uint SetBitsValue(uint value, int bitsOffset, int bitsCount) => (value & ~(~default(uint) << bitsCount)) << bitsOffset; } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/ScopedLock.cs b/src/LibHac/Os/ScopedLock.cs index 4e971b8e..cec7b25a 100644 --- a/src/LibHac/Os/ScopedLock.cs +++ b/src/LibHac/Os/ScopedLock.cs @@ -28,4 +28,4 @@ public ref struct ScopedLock where TMutex : IBasicLockable { _mutex.Value.Unlock(); } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Thread.cs b/src/LibHac/Os/Thread.cs index da03be85..7059aad5 100644 --- a/src/LibHac/Os/Thread.cs +++ b/src/LibHac/Os/Thread.cs @@ -8,4 +8,4 @@ public static class Thread { TimeoutHelperImpl.Sleep(os, time); } -} +} \ No newline at end of file diff --git a/src/LibHac/Os/Tick.cs b/src/LibHac/Os/Tick.cs index cbc26344..51be46d3 100644 --- a/src/LibHac/Os/Tick.cs +++ b/src/LibHac/Os/Tick.cs @@ -35,4 +35,4 @@ public static class TickApi public static long GetSystemTickFrequency(this OsState os) => os.GetTickManager().GetTickFrequency(); public static TimeSpan ConvertToTimeSpan(this OsState os, Tick tick) => os.GetTickManager().ConvertToTimespan(tick); public static Tick ConvertToTick(this OsState os, TimeSpan ts) => os.GetTickManager().ConvertToTick(ts); -} +} \ No newline at end of file diff --git a/src/LibHac/Os/UniqueLock.cs b/src/LibHac/Os/UniqueLock.cs index 714b0ba9..3c8de40c 100644 --- a/src/LibHac/Os/UniqueLock.cs +++ b/src/LibHac/Os/UniqueLock.cs @@ -207,4 +207,4 @@ public struct UniqueLock : IDisposable where TMutex : class, ILockable this = default; } -} +} \ No newline at end of file diff --git a/src/LibHac/SdmmcSrv/ISdmmcDeviceManager.cs b/src/LibHac/SdmmcSrv/ISdmmcDeviceManager.cs index d1a512d5..8753954a 100644 --- a/src/LibHac/SdmmcSrv/ISdmmcDeviceManager.cs +++ b/src/LibHac/SdmmcSrv/ISdmmcDeviceManager.cs @@ -8,4 +8,4 @@ internal interface ISdmmcDeviceManager IStorage GetStorage(); SdmmcPort GetPortId(); Result NotifyCloseStorageDevice(uint handle); -} +} \ No newline at end of file diff --git a/src/LibHac/Sf/Buffers.cs b/src/LibHac/Sf/Buffers.cs index f1a42c0a..7a0ac8c3 100644 --- a/src/LibHac/Sf/Buffers.cs +++ b/src/LibHac/Sf/Buffers.cs @@ -83,4 +83,4 @@ public readonly ref struct OutArray where T : unmanaged } public ref T this[int i] => ref _array[i]; -} +} \ No newline at end of file diff --git a/src/LibHac/Sf/NativeHandle.cs b/src/LibHac/Sf/NativeHandle.cs index 621c9938..d17ebdd3 100644 --- a/src/LibHac/Sf/NativeHandle.cs +++ b/src/LibHac/Sf/NativeHandle.cs @@ -27,4 +27,4 @@ public class NativeHandle : IDisposable if (IsManaged) Os.CloseNativeHandle(Handle.Object); } -} +} \ No newline at end of file diff --git a/src/LibHac/Sm/IServiceObject.cs b/src/LibHac/Sm/IServiceObject.cs index 05b294d9..eb92de4d 100644 --- a/src/LibHac/Sm/IServiceObject.cs +++ b/src/LibHac/Sm/IServiceObject.cs @@ -8,4 +8,4 @@ namespace LibHac.Sm; public interface IServiceObject : IDisposable { Result GetServiceObject(ref SharedRef serviceObject); -} +} \ No newline at end of file diff --git a/src/LibHac/Sm/ServiceManager.cs b/src/LibHac/Sm/ServiceManager.cs index b6d2aa30..b0f7b2a9 100644 --- a/src/LibHac/Sm/ServiceManager.cs +++ b/src/LibHac/Sm/ServiceManager.cs @@ -85,4 +85,4 @@ internal class ServiceManager return Result.Success; } -} +} \ No newline at end of file diff --git a/src/LibHac/Sm/ServiceManagerClient.cs b/src/LibHac/Sm/ServiceManagerClient.cs index 1e3bc70e..cf5c333d 100644 --- a/src/LibHac/Sm/ServiceManagerClient.cs +++ b/src/LibHac/Sm/ServiceManagerClient.cs @@ -36,4 +36,4 @@ public class ServiceManagerClient { return Server.UnregisterService(ServiceName.Encode(name)); } -} +} \ No newline at end of file diff --git a/src/LibHac/Svc/Handle.cs b/src/LibHac/Svc/Handle.cs index 33b051ba..55c93aed 100644 --- a/src/LibHac/Svc/Handle.cs +++ b/src/LibHac/Svc/Handle.cs @@ -8,4 +8,4 @@ public readonly struct Handle { Object = obj; } -} +} \ No newline at end of file diff --git a/src/LibHac/Time/PosixTime.cs b/src/LibHac/Time/PosixTime.cs index b50fed8a..a1f28d47 100644 --- a/src/LibHac/Time/PosixTime.cs +++ b/src/LibHac/Time/PosixTime.cs @@ -32,4 +32,4 @@ public readonly struct PosixTime : IComparable, IEquatable public override bool Equals(object obj) => obj is PosixTime time && Equals(time); public override int GetHashCode() => Value.GetHashCode(); -} +} \ No newline at end of file diff --git a/src/LibHac/TimeSpan.cs b/src/LibHac/TimeSpan.cs index 9374c043..419bb233 100644 --- a/src/LibHac/TimeSpan.cs +++ b/src/LibHac/TimeSpan.cs @@ -81,4 +81,4 @@ public readonly struct TimeSpanType : IEquatable, IComparable