mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 19:02:14 +02:00
fs: Added fsCreateSaveDataFileSystem() and fsDeleteSaveDataFileSystem().
This commit is contained in:
parent
d406db725d
commit
90e223e75b
@ -88,6 +88,13 @@ typedef struct {
|
||||
u8 unused[0x190]; ///< Uninitialized.
|
||||
} FsSaveDataExtraData;
|
||||
|
||||
/// FsSaveMeta
|
||||
typedef struct {
|
||||
u32 meta_file_size;
|
||||
u8 meta_index;
|
||||
u8 unk[0x0B];
|
||||
} FsSaveMeta;
|
||||
|
||||
/// SaveDataCreationInfo
|
||||
typedef struct {
|
||||
s64 save_data_size; ///< Size of the save data.
|
||||
@ -323,6 +330,8 @@ Result fsOpenBisStorage(FsStorage* out, FsBisPartitionId partitionId);
|
||||
/// Do not call this directly, see fs_dev.h.
|
||||
Result fsOpenSdCardFileSystem(FsFileSystem* out);
|
||||
|
||||
Result fsDeleteSaveDataFileSystem(u64 application_id);
|
||||
Result fsCreateSaveDataFileSystem(const FsSaveDataAttribute* attr, const FsSaveDataCreationInfo* creation_info, const FsSaveMeta* meta);
|
||||
Result fsCreateSaveDataFileSystemBySystemSaveDataId(const FsSaveDataAttribute* attr, const FsSaveDataCreationInfo* creation_info);
|
||||
Result fsDeleteSaveDataFileSystemBySaveDataSpaceId(FsSaveDataSpaceId save_data_space_id, u64 saveID); ///< [2.0.0+]
|
||||
|
||||
|
@ -224,6 +224,24 @@ Result fsOpenSdCardFileSystem(FsFileSystem* out) {
|
||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 18);
|
||||
}
|
||||
|
||||
Result fsDeleteSaveDataFileSystem(u64 application_id) {
|
||||
const struct {
|
||||
u64 application_id;
|
||||
} in = { application_id };
|
||||
|
||||
return _fsObjectDispatchIn(&g_fsSrv, 21, in);
|
||||
}
|
||||
|
||||
Result fsCreateSaveDataFileSystem(const FsSaveDataAttribute* attr, const FsSaveDataCreationInfo* creation_info, const FsSaveMeta* meta) {
|
||||
const struct {
|
||||
FsSaveDataAttribute attr;
|
||||
FsSaveDataCreationInfo creation_info;
|
||||
FsSaveMeta meta;
|
||||
} in = { *attr, *creation_info, *meta };
|
||||
|
||||
return _fsObjectDispatchIn(&g_fsSrv, 22, in);
|
||||
}
|
||||
|
||||
Result fsCreateSaveDataFileSystemBySystemSaveDataId(const FsSaveDataAttribute* attr, const FsSaveDataCreationInfo* creation_info) {
|
||||
const struct {
|
||||
FsSaveDataAttribute attr;
|
||||
|
Loading…
Reference in New Issue
Block a user