mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-23 03:29:45 +00:00
CFGI_SecureInfoGetSerialNumber is now included in ctrulib
This commit is contained in:
parent
713fb65fa3
commit
63d9fce285
@ -1,10 +0,0 @@
|
||||
#ifndef CFGS_H
|
||||
#define CFGS_H
|
||||
|
||||
#include <3ds.h>
|
||||
|
||||
Result cfgsInit(void);
|
||||
Result cfgsExit(void);
|
||||
Result CFGS_SecureInfoGetSerialNo(u8 * serial);
|
||||
|
||||
#endif
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "ac.h"
|
||||
#include "actu.h"
|
||||
#include "cfgs.h"
|
||||
#include "fs.h"
|
||||
#include "hardware.h"
|
||||
#include "kernel.h"
|
||||
@ -22,7 +21,6 @@ void initServices()
|
||||
{
|
||||
gfxInitDefault();
|
||||
cfguInit();
|
||||
cfgsInit();
|
||||
ptmuInit();
|
||||
mcuInit();
|
||||
amInit();
|
||||
@ -59,7 +57,6 @@ void termServices()
|
||||
amExit();
|
||||
mcuExit();
|
||||
ptmuExit();
|
||||
cfgsExit();
|
||||
cfguExit();
|
||||
gfxExit();
|
||||
}
|
||||
|
@ -1,29 +0,0 @@
|
||||
#include "cfgs.h"
|
||||
|
||||
static Handle cfgsHandle;
|
||||
|
||||
Result cfgsInit(void) // Already initialized with CFGUinit(), but we need to use this handle.
|
||||
{
|
||||
return srvGetServiceHandle(&cfgsHandle, "cfg:s");
|
||||
}
|
||||
|
||||
Result cfgsExit(void)
|
||||
{
|
||||
return svcCloseHandle(cfgsHandle);
|
||||
}
|
||||
|
||||
Result CFGS_SecureInfoGetSerialNo(u8 * serial)
|
||||
{
|
||||
Result ret = 0;
|
||||
u32 * cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0x408, 1, 2); // 0x04080042
|
||||
cmdbuf[1] = 0xF;
|
||||
cmdbuf[2] = 12 | (0xF << 4);
|
||||
cmdbuf[3] = (u32)serial;
|
||||
|
||||
if (R_FAILED(ret = svcSendSyncRequest(cfgsHandle)))
|
||||
return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
@ -219,7 +219,7 @@ u8 * getSerialNumber(void)
|
||||
{
|
||||
static u8 serial[0xF];
|
||||
|
||||
if (R_SUCCEEDED(CFGS_SecureInfoGetSerialNo(serial)))
|
||||
if (R_SUCCEEDED(CFGI_SecureInfoGetSerialNumber(serial)))
|
||||
return serial;
|
||||
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user