pm: Use result definitions instead of magic numbers
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user