mirror of
https://github.com/switchbrew/libnx.git
synced 2025-09-25 06:23:20 +02:00
Merge 0eb0c379f4
into f6e45096aa
This commit is contained in:
commit
e9abc81c3a
@ -261,6 +261,11 @@ typedef enum {
|
|||||||
FsGameCardPartition_Logo = 3, ///< [4.0.0+]
|
FsGameCardPartition_Logo = 3, ///< [4.0.0+]
|
||||||
} FsGameCardPartition;
|
} FsGameCardPartition;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FsGameCardPartitionRaw_Normal = 0,
|
||||||
|
FsGameCardPartitionRaw_Secure = 1,
|
||||||
|
} FsGameCardPartitionRaw;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u32 value;
|
u32 value;
|
||||||
} FsGameCardHandle;
|
} FsGameCardHandle;
|
||||||
@ -540,8 +545,11 @@ Result fsOpenDataStorageByProgramId(FsStorage *out, u64 program_id); /// <[3.0.0
|
|||||||
Result fsOpenDataStorageByDataId(FsStorage* out, u64 dataId, NcmStorageId storageId);
|
Result fsOpenDataStorageByDataId(FsStorage* out, u64 dataId, NcmStorageId storageId);
|
||||||
Result fsOpenPatchDataStorageByCurrentProcess(FsStorage* out);
|
Result fsOpenPatchDataStorageByCurrentProcess(FsStorage* out);
|
||||||
|
|
||||||
|
Result fsOpenGameCardPartition(FsStorage* out, const FsGameCardHandle* handle, FsGameCardPartitionRaw partition);
|
||||||
|
|
||||||
Result fsOpenDeviceOperator(FsDeviceOperator* out);
|
Result fsOpenDeviceOperator(FsDeviceOperator* out);
|
||||||
Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out);
|
Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out);
|
||||||
|
Result fsOpenGameCardDetectionEventNotifier(FsEventNotifier* out);
|
||||||
|
|
||||||
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out);
|
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out);
|
||||||
|
|
||||||
|
@ -538,6 +538,18 @@ Result fsOpenPatchDataStorageByCurrentProcess(FsStorage* out) {
|
|||||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 203);
|
return _fsCmdGetSession(&g_fsSrv, &out->s, 203);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result fsOpenGameCardPartition(FsStorage* out, const FsGameCardHandle* handle, FsGameCardPartitionRaw partition) {
|
||||||
|
const struct {
|
||||||
|
FsGameCardHandle handle;
|
||||||
|
u32 partition;
|
||||||
|
} in = { *handle, (u32)partition };
|
||||||
|
|
||||||
|
return serviceDispatchIn(&g_fsSrv, 30, in,
|
||||||
|
.out_num_objects = 1,
|
||||||
|
.out_objects = &out->s
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Result fsOpenDeviceOperator(FsDeviceOperator* out) {
|
Result fsOpenDeviceOperator(FsDeviceOperator* out) {
|
||||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 400);
|
return _fsCmdGetSession(&g_fsSrv, &out->s, 400);
|
||||||
}
|
}
|
||||||
@ -546,6 +558,10 @@ Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out) {
|
|||||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 500);
|
return _fsCmdGetSession(&g_fsSrv, &out->s, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result fsOpenGameCardDetectionEventNotifier(FsEventNotifier* out) {
|
||||||
|
return _fsCmdGetSession(&g_fsSrv, &out->s, 501);
|
||||||
|
}
|
||||||
|
|
||||||
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out) {
|
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out) {
|
||||||
if (!hosversionBetween(4, 8))
|
if (!hosversionBetween(4, 8))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
Loading…
Reference in New Issue
Block a user