Skip to content

Commit

Permalink
add fsDeviceOperatorGetGameCardUpdatePartitionInfo (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
ITotalJustice authored Nov 23, 2023
1 parent 8d10ef8 commit fda4e6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nx/include/switch/services/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ typedef struct {
u32 value;
} FsGameCardHandle;

typedef struct {
u32 version;
u8 pad[0x4];
u64 id;
} FsGameCardUpdatePartitionInfo;

typedef struct {
u32 aes_ctr_key_type; ///< Contains bitflags describing how data is AES encrypted.
u32 speed_emulation_type; ///< Contains bitflags describing how data is emulated.
Expand Down Expand Up @@ -642,6 +648,7 @@ Result fsDeviceOperatorGetAndClearMmcErrorInfo(FsDeviceOperator* d, FsStorageErr
Result fsDeviceOperatorGetMmcExtendedCsd(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size);
Result fsDeviceOperatorIsGameCardInserted(FsDeviceOperator* d, bool* out);
Result fsDeviceOperatorGetGameCardHandle(FsDeviceOperator* d, FsGameCardHandle* out);
Result fsDeviceOperatorGetGameCardUpdatePartitionInfo(FsDeviceOperator* d, const FsGameCardHandle* handle, FsGameCardUpdatePartitionInfo* out);
Result fsDeviceOperatorGetGameCardAttribute(FsDeviceOperator* d, const FsGameCardHandle* handle, u8 *out);
Result fsDeviceOperatorGetGameCardIdSet(FsDeviceOperator* d, void* dst, size_t dst_size, s64 size);
Result fsDeviceOperatorGetGameCardErrorReportInfo(FsDeviceOperator* d, FsGameCardErrorReportInfo* out);
Expand Down
4 changes: 4 additions & 0 deletions nx/source/services/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,10 @@ Result fsDeviceOperatorGetGameCardHandle(FsDeviceOperator* d, FsGameCardHandle*
return _fsObjectDispatchOut(&d->s, 202, *out);
}

Result fsDeviceOperatorGetGameCardUpdatePartitionInfo(FsDeviceOperator* d, const FsGameCardHandle* handle, FsGameCardUpdatePartitionInfo* out) {
return _fsObjectDispatchInOut(&d->s, 203, *handle, *out);
}

Result fsDeviceOperatorGetGameCardAttribute(FsDeviceOperator* d, const FsGameCardHandle* handle, u8 *out) {
return _fsObjectDispatchInOut(&d->s, 205, *handle, *out);
}
Expand Down

0 comments on commit fda4e6b

Please sign in to comment.