fs: add IsSignedSystemPartitionOnSdCardValid (#381)

This commit is contained in:
SciresM 2020-03-07 03:40:02 -08:00 committed by GitHub
parent 1b1620f7bb
commit c3b0b63471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -345,6 +345,8 @@ Result fsOpenDataStorageByDataId(FsStorage* out, u64 dataId, NcmStorageId storag
Result fsOpenDeviceOperator(FsDeviceOperator* out);
Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out);
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out);
/// Retrieves the rights id corresponding to the content path. Only available on [2.0.0+].
Result fsGetRightsIdByPath(const char* path, FsRightsId* out_rights_id);

View File

@ -402,6 +402,13 @@ Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out) {
return _fsCmdGetSession(&g_fsSrv, &out->s, 500);
}
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out) {
if (!hosversionBetween(4, 8))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _fsCmdNoInOutBool(&g_fsSrv, out, 640);
}
Result fsGetRightsIdByPath(const char* path, FsRightsId* out_rights_id) {
if (hosversionBefore(2,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);