fs: add fsOpenImageDirectoryFileSystem and FsImageDirectoryId

This commit is contained in:
HookedBehemoth 2020-01-29 02:29:24 +01:00 committed by yellows8
parent 6c706d910f
commit c28d736ff0
2 changed files with 15 additions and 0 deletions

View File

@ -170,6 +170,12 @@ typedef enum {
FsCustomStorageId_SdCard = 1, FsCustomStorageId_SdCard = 1,
} FsCustomStorageId; } FsCustomStorageId;
/// ImageDirectoryId
typedef enum {
FsImageDirectoryId_Nand = 0,
FsImageDirectoryId_Sd = 1,
} FsImageDirectoryId;
/// SaveDataSpaceId /// SaveDataSpaceId
typedef enum { typedef enum {
FsSaveDataSpaceId_System = 0, ///< System FsSaveDataSpaceId_System = 0, ///< System
@ -329,6 +335,7 @@ Result fsWriteSaveDataFileSystemExtraData(const void* buf, size_t len, FsSaveDat
Result fsOpenSaveDataInfoReader(FsSaveDataInfoReader* out, FsSaveDataSpaceId save_data_space_id); Result fsOpenSaveDataInfoReader(FsSaveDataInfoReader* out, FsSaveDataSpaceId save_data_space_id);
Result fsOpenImageDirectoryFileSystem(FsFileSystem* out, FsImageDirectoryId image_directory_id);
Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id); Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id);
Result fsOpenCustomStorageFileSystem(FsFileSystem* out, FsCustomStorageId custom_storage_id); /// [7.0.0+] Result fsOpenCustomStorageFileSystem(FsFileSystem* out, FsCustomStorageId custom_storage_id); /// [7.0.0+]

View File

@ -351,6 +351,14 @@ Result fsOpenSaveDataInfoReader(FsSaveDataInfoReader* out, FsSaveDataSpaceId sav
} }
} }
Result fsOpenImageDirectoryFileSystem(FsFileSystem* out, FsImageDirectoryId image_directory_id) {
u32 tmp=image_directory_id;
return _fsObjectDispatchIn(&g_fsSrv, 100, tmp,
.out_num_objects = 1,
.out_objects = &out->s,
);
}
Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id) { Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id) {
u32 tmp=content_storage_id; u32 tmp=content_storage_id;
return _fsObjectDispatchIn(&g_fsSrv, 110, tmp, return _fsObjectDispatchIn(&g_fsSrv, 110, tmp,