mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-22 18:26:39 +00:00
Fix building with latest libnx commit.
This commit is contained in:
parent
7b707509c7
commit
c5d6081f08
3 changed files with 5 additions and 21 deletions
|
@ -77,7 +77,7 @@ typedef enum {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 maker_code; ///< FsCardId1MakerCode.
|
u8 maker_code; ///< FsCardId1MakerCode.
|
||||||
u8 memory_capacity; ///< Matches GameCardRomSize.
|
u8 memory_capacity; ///< Matches GameCardRomSize.
|
||||||
u8 reserved; ///< Known values: 0x00, 0x01, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0C, 0x0D, 0x0E, 0x80.
|
u8 reserved; ///< Known values: 0x00, 0x01, 0x02, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0C, 0x0D, 0x0E, 0x80.
|
||||||
u8 memory_type; ///< FsCardId1MemoryType.
|
u8 memory_type; ///< FsCardId1MemoryType.
|
||||||
} FsCardId1;
|
} FsCardId1;
|
||||||
|
|
||||||
|
@ -108,9 +108,9 @@ NXDT_ASSERT(FsCardId3, 0x4);
|
||||||
|
|
||||||
/// Returned by fsDeviceOperatorGetGameCardIdSet.
|
/// Returned by fsDeviceOperatorGetGameCardIdSet.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
FsCardId1 id1; ///< Specifies maker code, memory capacity, and memory type
|
FsCardId1 id1; ///< Specifies maker code, memory capacity and memory type.
|
||||||
FsCardId2 id2; ///< Specifies card security number and card type
|
FsCardId2 id2; ///< Specifies card security number and card type.
|
||||||
FsCardId3 id3; ///< Always zero (so far)
|
FsCardId3 id3; ///< Always zero (so far).
|
||||||
} FsGameCardIdSet;
|
} FsGameCardIdSet;
|
||||||
|
|
||||||
NXDT_ASSERT(FsGameCardIdSet, 0xC);
|
NXDT_ASSERT(FsGameCardIdSet, 0xC);
|
||||||
|
@ -121,7 +121,6 @@ Result fsOpenGameCardDetectionEventNotifier(FsEventNotifier *out);
|
||||||
|
|
||||||
/// IDeviceOperator.
|
/// IDeviceOperator.
|
||||||
Result fsDeviceOperatorUpdatePartitionInfo(FsDeviceOperator *d, const FsGameCardHandle *handle, u32 *out_title_version, u64 *out_title_id);
|
Result fsDeviceOperatorUpdatePartitionInfo(FsDeviceOperator *d, const FsGameCardHandle *handle, u32 *out_title_version, u64 *out_title_id);
|
||||||
Result fsDeviceOperatorGetGameCardDeviceCertificate(FsDeviceOperator *d, const FsGameCardHandle *handle, FsGameCardCertificate *out);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,18 +63,3 @@ Result fsDeviceOperatorUpdatePartitionInfo(FsDeviceOperator *d, const FsGameCard
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result fsDeviceOperatorGetGameCardDeviceCertificate(FsDeviceOperator *d, const FsGameCardHandle *handle, FsGameCardCertificate *out)
|
|
||||||
{
|
|
||||||
const struct {
|
|
||||||
FsGameCardHandle handle;
|
|
||||||
u64 buf_size;
|
|
||||||
} in = { *handle, sizeof(FsGameCardCertificate) };
|
|
||||||
|
|
||||||
Result rc = serviceDispatchIn(&d->s, 206, in,
|
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
|
||||||
.buffers = { { out, sizeof(FsGameCardCertificate) } }
|
|
||||||
);
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
|
@ -379,7 +379,7 @@ bool gamecardGetCertificate(FsGameCardCertificate *out)
|
||||||
if (!g_gameCardInterfaceInit || g_gameCardStatus != GameCardStatus_InsertedAndInfoLoaded || !g_gameCardHandle.value || !out) break;
|
if (!g_gameCardInterfaceInit || g_gameCardStatus != GameCardStatus_InsertedAndInfoLoaded || !g_gameCardHandle.value || !out) break;
|
||||||
|
|
||||||
/* Read the gamecard certificate using the official IPC call. */
|
/* Read the gamecard certificate using the official IPC call. */
|
||||||
Result rc = fsDeviceOperatorGetGameCardDeviceCertificate(&g_deviceOperator, &g_gameCardHandle, out);
|
Result rc = fsDeviceOperatorGetGameCardDeviceCertificate(&g_deviceOperator, &g_gameCardHandle, out, sizeof(FsGameCardCertificate), (s64)sizeof(FsGameCardCertificate));
|
||||||
if (R_FAILED(rc)) LOG_MSG_ERROR("fsDeviceOperatorGetGameCardDeviceCertificate failed! (0x%X)", rc);
|
if (R_FAILED(rc)) LOG_MSG_ERROR("fsDeviceOperatorGetGameCardDeviceCertificate failed! (0x%X)", rc);
|
||||||
|
|
||||||
ret = R_SUCCEEDED(rc);
|
ret = R_SUCCEEDED(rc);
|
||||||
|
|
Loading…
Reference in a new issue