mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
29 lines
553 B
C
29 lines
553 B
C
#define NX_SERVICE_ASSUME_NON_DOMAIN
|
|
#include "service_guard.h"
|
|
#include "services/spsm.h"
|
|
|
|
static Service g_spsmSrv;
|
|
|
|
NX_GENERATE_SERVICE_GUARD(spsm);
|
|
|
|
Result _spsmInitialize(void) {
|
|
return smGetService(&g_spsmSrv, "spsm");
|
|
}
|
|
|
|
void _spsmCleanup(void) {
|
|
serviceClose(&g_spsmSrv);
|
|
}
|
|
|
|
Service* spsmGetServiceSession(void) {
|
|
return &g_spsmSrv;
|
|
}
|
|
|
|
Result spsmShutdown(bool reboot) {
|
|
const u8 in = reboot != 0;
|
|
return serviceDispatchIn(&g_spsmSrv, 3, in);
|
|
}
|
|
|
|
Result spsmPutErrorState(void) {
|
|
return serviceDispatch(&g_spsmSrv, 10);
|
|
}
|