From 3afc9ae37114b449fa201ada37f58f511d14048d Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sat, 1 Jun 2019 19:01:18 -0700 Subject: [PATCH] Add FsBisStorageId enum --- nx/include/switch/services/fs.h | 25 +++++++++++++++++++++++-- nx/source/services/fs.c | 4 ++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/nx/include/switch/services/fs.h b/nx/include/switch/services/fs.h index b96e77da..73655332 100644 --- a/nx/include/switch/services/fs.h +++ b/nx/include/switch/services/fs.h @@ -193,13 +193,34 @@ typedef enum { FsOperationId_QueryRange, ///< Retrieves information on data for supported file/storage. } FsOperationId; +typedef enum { + FsBisStorageId_Boot0 = 0, + + FsBisStorageId_Boot1 = 10, + + FsBisStorageId_UserDataRoot = 20, + FsBisStorageId_BootConfigAndPackage2NormalMain = 21, + FsBisStorageId_BootConfigAndPackage2NormalSub = 22, + FsBisStorageId_BootConfigAndPackage2SafeMain = 23, + FsBisStorageId_BootConfigAndPackage2SafeSub = 24, + FsBisStorageId_BootConfigAndPackage2RepairMain = 25, + FsBisStorageId_BootConfigAndPackage2RepairSub = 26, + FsBisStorageId_CalibrationBinary = 27, + FsBisStorageId_CalibrationFile = 28, + FsBisStorageId_SafeMode = 29, + FsBisStorageId_User = 30, + FsBisStorageId_System = 31, + FsBisStorageId_SystemProperEncryption = 32, + FsBisStorageId_SystemProperPartition = 33, +} FsBisStorageId; + Result fsInitialize(void); void fsExit(void); Service* fsGetServiceSession(void); -Result fsOpenBisStorage(FsStorage* out, u32 PartitionId); -Result fsOpenBisFileSystem(FsFileSystem* out, u32 PartitionId, const char* string); +Result fsOpenBisStorage(FsStorage* out, FsBisStorageId PartitionId); +Result fsOpenBisFileSystem(FsFileSystem* out, FsBisStorageId PartitionId, const char* string); Result fsIsExFatSupported(bool* out); diff --git a/nx/source/services/fs.c b/nx/source/services/fs.c index f9218305..f2492d51 100644 --- a/nx/source/services/fs.c +++ b/nx/source/services/fs.c @@ -70,7 +70,7 @@ Service* fsGetServiceSession(void) { return &g_fsSrv; } -Result fsOpenBisStorage(FsStorage* out, u32 PartitionId) { +Result fsOpenBisStorage(FsStorage* out, FsBisStorageId PartitionId) { IpcCommand c; ipcInitialize(&c); @@ -108,7 +108,7 @@ Result fsOpenBisStorage(FsStorage* out, u32 PartitionId) { return rc; } -Result fsOpenBisFileSystem(FsFileSystem* out, u32 PartitionId, const char* string) { +Result fsOpenBisFileSystem(FsFileSystem* out, FsBisStorageId PartitionId, const char* string) { IpcCommand c; ipcInitialize(&c);