mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
pm: add getters for pminfo, pmshell
This commit is contained in:
parent
65e2e791a3
commit
18f977aa76
@ -54,9 +54,13 @@ Service* pmdmntGetServiceSession(void);
|
||||
Result pminfoInitialize(void);
|
||||
void pminfoExit(void);
|
||||
|
||||
Service* pminfoGetServiceSession(void);
|
||||
|
||||
Result pmshellInitialize(void);
|
||||
void pmshellExit(void);
|
||||
|
||||
Service* pmshellGetServiceSession(void);
|
||||
|
||||
Result pmdmntGetDebugProcesses(u32* out_count, u64* out_pids, size_t max_pids);
|
||||
Result pmdmntStartProcess(u64 pid);
|
||||
Result pmdmntGetTitlePid(u64* pid_out, u64 title_id);
|
||||
|
@ -48,6 +48,11 @@ void pminfoExit(void)
|
||||
}
|
||||
}
|
||||
|
||||
Service* pminfoGetServiceSession(void)
|
||||
{
|
||||
return &g_pminfoSrv;
|
||||
}
|
||||
|
||||
Result pmshellInitialize(void)
|
||||
{
|
||||
atomicIncrement64(&g_pmshellRefCnt);
|
||||
@ -65,6 +70,11 @@ void pmshellExit(void)
|
||||
}
|
||||
}
|
||||
|
||||
Service* pmshellGetServiceSession(void)
|
||||
{
|
||||
return &g_pmshellSrv;
|
||||
}
|
||||
|
||||
Result pmdmntGetDebugProcesses(u32* out_count, u64* out_pids, size_t max_pids) {
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
@ -475,7 +485,7 @@ Result pmshellGetProcessEvent(Event* out) {
|
||||
if (R_SUCCEEDED(rc)) {
|
||||
IpcParsedCommand r;
|
||||
ipcParse(&r);
|
||||
|
||||
|
||||
struct {
|
||||
u64 magic;
|
||||
u64 result;
|
||||
@ -510,7 +520,7 @@ Result pmshellGetProcessEventInfo(PmProcessEventInfo* out) {
|
||||
if (R_SUCCEEDED(rc)) {
|
||||
IpcParsedCommand r;
|
||||
ipcParse(&r);
|
||||
|
||||
|
||||
struct {
|
||||
u64 magic;
|
||||
u64 result;
|
||||
@ -534,7 +544,7 @@ Result pmshellGetProcessEventInfo(PmProcessEventInfo* out) {
|
||||
|
||||
Result pmshellFinalizeDeadProcess(u64 pid) {
|
||||
if (hosversionAtLeast(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
@ -569,7 +579,7 @@ Result pmshellFinalizeDeadProcess(u64 pid) {
|
||||
|
||||
Result pmshellClearProcessExceptionOccurred(u64 pid) {
|
||||
if (hosversionAtLeast(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
@ -671,7 +681,7 @@ Result pmshellGetApplicationPid(u64* pid_out) {
|
||||
|
||||
Result pmshellBoostSystemMemoryResourceLimit(u64 boost_size) {
|
||||
if (hosversionBefore(4,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user