pm: Use result definitions instead of magic numbers

This commit is contained in:
Michael Scire
2019-03-28 15:16:36 -07:00
parent db19fa0f7f
commit 696f66f620
6 changed files with 18 additions and 18 deletions

View File

@@ -34,7 +34,7 @@ Result ShellService::TerminateProcessId(u64 pid) {
if (proc != nullptr) {
return svcTerminateProcess(proc->handle);
} else {
return 0x20F;
return ResultPmProcessNotFound;
}
}
@@ -45,7 +45,7 @@ Result ShellService::TerminateTitleId(u64 tid) {
if (proc != NULL) {
return svcTerminateProcess(proc->handle);
} else {
return 0x20F;
return ResultPmProcessNotFound;
}
}
@@ -62,9 +62,9 @@ Result ShellService::FinalizeExitedProcess(u64 pid) {
auto proc = Registration::GetProcess(pid);
if (proc == NULL) {
return 0x20F;
return ResultPmProcessNotFound;
} else if (proc->state != ProcessState_Exited) {
return 0x60F;
return ResultPmNotExited;
} else {
Registration::FinalizeExitedProcess(proc);
return 0x0;
@@ -79,7 +79,7 @@ Result ShellService::ClearProcessNotificationFlag(u64 pid) {
proc->flags &= ~PROCESSFLAGS_CRASHED;
return 0x0;
} else {
return 0x20F;
return ResultPmProcessNotFound;
}
}
@@ -98,7 +98,7 @@ Result ShellService::GetApplicationProcessId(Out<u64> pid) {
pid.SetValue(app_proc->pid);
return 0;
}
return 0x20F;
return ResultPmProcessNotFound;
}
Result ShellService::BoostSystemMemoryResourceLimit(u64 sysmem_size) {