mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
fs: add GetContentStorageInfoIndex
This commit is contained in:
parent
163fdddabf
commit
73d79d4a0f
@ -553,6 +553,8 @@ Result fsGetRightsIdByPath(const char* path, FsRightsId* out_rights_id);
|
|||||||
/// Retrieves the rights id and key generation corresponding to the content path. Only available on [3.0.0+], attr is ignored before [16.0.0].
|
/// Retrieves the rights id and key generation corresponding to the content path. Only available on [3.0.0+], attr is ignored before [16.0.0].
|
||||||
Result fsGetRightsIdAndKeyGenerationByPath(const char* path, FsContentAttributes attr, u8* out_key_generation, FsRightsId* out_rights_id);
|
Result fsGetRightsIdAndKeyGenerationByPath(const char* path, FsContentAttributes attr, u8* out_key_generation, FsRightsId* out_rights_id);
|
||||||
|
|
||||||
|
Result fsGetContentStorageInfoIndex(s32 *out); ///< [19.0.0+]
|
||||||
|
|
||||||
Result fsDisableAutoSaveDataCreation(void);
|
Result fsDisableAutoSaveDataCreation(void);
|
||||||
|
|
||||||
Result fsSetGlobalAccessLogMode(u32 mode);
|
Result fsSetGlobalAccessLogMode(u32 mode);
|
||||||
|
@ -623,6 +623,13 @@ Result fsGetAndClearErrorInfo(FsFileSystemProxyErrorInfo *out) {
|
|||||||
return _fsObjectDispatchOut(&g_fsSrv, 800, *out);
|
return _fsObjectDispatchOut(&g_fsSrv, 800, *out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result fsGetContentStorageInfoIndex(s32 *out) {
|
||||||
|
if (hosversionBefore(19,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _fsCmdNoInOutU32(&g_fsSrv, (u32 *)out, 820);
|
||||||
|
}
|
||||||
|
|
||||||
Result fsDisableAutoSaveDataCreation(void) {
|
Result fsDisableAutoSaveDataCreation(void) {
|
||||||
return _fsCmdNoIO(&g_fsSrv, 1003);
|
return _fsCmdNoIO(&g_fsSrv, 1003);
|
||||||
}
|
}
|
||||||
@ -1239,7 +1246,8 @@ Result fsDeviceOperatorGetGameCardDeviceCertificate(FsDeviceOperator* d, const F
|
|||||||
s64 buffer_size;
|
s64 buffer_size;
|
||||||
} in = { *handle, size };
|
} in = { *handle, size };
|
||||||
|
|
||||||
s64 os;
|
// Assume old gamecard certificate size on pre-19.0.0
|
||||||
|
s64 os = 0x200;
|
||||||
Result rc;
|
Result rc;
|
||||||
|
|
||||||
if (hosversionAtLeast(19,0,0)) {
|
if (hosversionAtLeast(19,0,0)) {
|
||||||
@ -1250,9 +1258,6 @@ Result fsDeviceOperatorGetGameCardDeviceCertificate(FsDeviceOperator* d, const F
|
|||||||
rc = _fsObjectDispatchIn(&d->s, 206, in,
|
rc = _fsObjectDispatchIn(&d->s, 206, in,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
.buffers = { { dst, dst_size } });
|
.buffers = { { dst, dst_size } });
|
||||||
|
|
||||||
// Assume old gamecard certificate size on pre-19.0.0
|
|
||||||
os = 0x200;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc))
|
if (R_SUCCEEDED(rc))
|
||||||
|
Loading…
Reference in New Issue
Block a user