mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Added fsDeleteSaveDataFileSystemBySaveDataSpaceId (#304)
This commit is contained in:
parent
26544cba43
commit
0e724040ad
@ -239,6 +239,7 @@ Result fsOpenBisStorage(FsStorage* out, FsBisStorageId partitionId);
|
||||
Result fsOpenBisFileSystem(FsFileSystem* out, FsBisStorageId partitionId, const char* string);
|
||||
|
||||
Result fsCreateSaveDataFileSystemBySystemSaveDataId(const FsSave* save, const FsSaveCreate* create);
|
||||
Result fsDeleteSaveDataFileSystemBySaveDataSpaceId(FsSaveDataSpaceId saveDataSpaceId, u64 saveID);
|
||||
|
||||
Result fsIsExFatSupported(bool* out);
|
||||
|
||||
|
@ -186,6 +186,42 @@ Result fsCreateSaveDataFileSystemBySystemSaveDataId(const FsSave* save, const Fs
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result fsDeleteSaveDataFileSystemBySaveDataSpaceId(FsSaveDataSpaceId saveDataSpaceId, u64 saveID) {
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
struct {
|
||||
u64 magic;
|
||||
u64 cmd_id;
|
||||
u8 saveDataSpaceId;
|
||||
u64 saveID;
|
||||
} *raw;
|
||||
|
||||
raw = serviceIpcPrepareHeader(&g_fsSrv, &c, sizeof(*raw));
|
||||
|
||||
raw->magic = SFCI_MAGIC;
|
||||
raw->cmd_id = 25;
|
||||
raw->saveDataSpaceId = saveDataSpaceId;
|
||||
raw->saveID = saveID;
|
||||
|
||||
Result rc = serviceIpcDispatch(&g_fsSrv);
|
||||
|
||||
if (R_SUCCEEDED(rc)) {
|
||||
IpcParsedCommand r;
|
||||
struct {
|
||||
u64 magic;
|
||||
u64 result;
|
||||
} *resp;
|
||||
|
||||
serviceIpcParse(&g_fsSrv, &r, sizeof(*resp));
|
||||
resp = r.Raw;
|
||||
|
||||
rc = resp->result;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result fsMountSdcard(FsFileSystem* out) {
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
Loading…
Reference in New Issue
Block a user