From 436f71e6a79429580be7dbc9ad6d56301e1e6a2d Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Mon, 15 Jul 2024 19:27:51 -0700 Subject: [PATCH] Make sure some FsCreator classes are updated --- src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs | 4 ++++ src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs | 3 +++ src/LibHac/FsSrv/FsCreator/SdStorageCreator.cs | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs index 4060a3c1..3d0c30da 100644 --- a/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/IPartitionFileSystemCreator.cs @@ -4,6 +4,10 @@ using LibHac.Fs.Fsa; namespace LibHac.FsSrv.FsCreator; +/// +/// Creates an from an containing a partition filesystem. +/// +/// Based on nnSdk 18.3.0 (FS 18.0.0) public interface IPartitionFileSystemCreator { Result Create(ref SharedRef outFileSystem, ref readonly SharedRef baseStorage); diff --git a/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs b/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs index b6550c5e..cfa87f06 100644 --- a/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/PartitionFileSystemCreator.cs @@ -5,11 +5,14 @@ using LibHac.FsSystem; namespace LibHac.FsSrv.FsCreator; +/// public class PartitionFileSystemCreator : IPartitionFileSystemCreator { public Result Create(ref SharedRef outFileSystem, ref readonly SharedRef baseStorage) { using var partitionFs = new SharedRef(new PartitionFileSystem()); + if (!partitionFs.HasValue) + return ResultFs.AllocationMemoryFailedInPartitionFileSystemCreatorA.Log(); Result res = partitionFs.Get.Initialize(in baseStorage); if (res.IsFailure()) return res.Miss(); diff --git a/src/LibHac/FsSrv/FsCreator/SdStorageCreator.cs b/src/LibHac/FsSrv/FsCreator/SdStorageCreator.cs index bbb101ee..693f5d3c 100644 --- a/src/LibHac/FsSrv/FsCreator/SdStorageCreator.cs +++ b/src/LibHac/FsSrv/FsCreator/SdStorageCreator.cs @@ -7,7 +7,7 @@ namespace LibHac.FsSrv.FsCreator; /// /// Creates s for accessing the inserted SD card's storage. /// -/// Based on nnSdk 16.2.0 (FS 16.0.0) +/// Based on nnSdk 18.3.0 (FS 18.0.0) public class SdStorageCreator : ISdStorageCreator { // LibHac addition