strat: 0 -> ResultSuccess
This commit is contained in:
@@ -27,7 +27,7 @@ Result DebugMonitorService::GetUnknownStub(Out<u32> count, OutBuffer<u8> out_buf
|
||||
return ResultPmInvalidSize;
|
||||
}
|
||||
count.SetValue(0);
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result DebugMonitorService::GetDebugProcessIds(Out<u32> count, OutBuffer<u64> out_pids) {
|
||||
@@ -47,7 +47,7 @@ Result DebugMonitorService::GetTitleProcessId(Out<u64> pid, u64 tid) {
|
||||
std::shared_ptr<Registration::Process> proc = Registration::GetProcessByTitleId(tid);
|
||||
if (proc != nullptr) {
|
||||
pid.SetValue(proc->pid);
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultPmProcessNotFound;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ Result DebugMonitorService::GetApplicationProcessId(Out<u64> pid) {
|
||||
std::shared_ptr<Registration::Process> app_proc;
|
||||
if (Registration::HasApplicationProcess(&app_proc)) {
|
||||
pid.SetValue(app_proc->pid);
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultPmProcessNotFound;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ Result DebugMonitorService::AtmosphereGetProcessInfo(Out<CopiedHandle> proc_hand
|
||||
if (proc != nullptr) {
|
||||
proc_hand.SetValue(proc->handle);
|
||||
tid_sid.SetValue(proc->tid_sid);
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultPmProcessNotFound;
|
||||
}
|
||||
@@ -104,5 +104,5 @@ Result DebugMonitorService::AtmosphereGetCurrentLimitInfo(Out<u64> cur_val, Out<
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ Result InformationService::GetTitleId(Out<u64> tid, u64 pid) {
|
||||
std::shared_ptr<Registration::Process> proc = Registration::GetProcess(pid);
|
||||
if (proc != NULL) {
|
||||
tid.SetValue(proc->tid_sid.title_id);
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultPmProcessNotFound;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ void Registration::InitializeSystemResources() {
|
||||
Result Registration::ProcessLaunchStartCallback(u64 timeout) {
|
||||
g_process_launch_start_event->Clear();
|
||||
Registration::HandleProcessLaunch();
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
IWaitable *Registration::GetProcessLaunchStartEvent() {
|
||||
@@ -137,13 +137,13 @@ void Registration::HandleProcessLaunch() {
|
||||
if (new_process.tid_sid.title_id == g_debug_on_launch_tid.load()) {
|
||||
g_debug_title_event->Signal();
|
||||
g_debug_on_launch_tid = 0;
|
||||
rc = 0;
|
||||
rc = ResultSuccess;
|
||||
} else if ((new_process.flags & PROCESSFLAGS_APPLICATION) && g_debug_next_application.load()) {
|
||||
g_debug_application_event->Signal();
|
||||
g_debug_next_application = false;
|
||||
rc = 0;
|
||||
rc = ResultSuccess;
|
||||
} else if (LAUNCHFLAGS_STARTSUSPENDED(launch_flags)) {
|
||||
rc = 0;
|
||||
rc = ResultSuccess;
|
||||
} else {
|
||||
rc = svcStartProcess(new_process.handle, program_info.main_thread_priority, program_info.default_cpu_id, program_info.main_thread_stack_size);
|
||||
|
||||
@@ -283,7 +283,7 @@ Result Registration::HandleSignaledProcess(std::shared_ptr<Registration::Process
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
void Registration::FinalizeExitedProcess(std::shared_ptr<Registration::Process> process) {
|
||||
@@ -414,7 +414,7 @@ Result Registration::GetDebugProcessIds(u64 *out_pids, u32 max_out, u32 *num_out
|
||||
}
|
||||
|
||||
*num_out = num;
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Handle Registration::GetProcessEventHandle() {
|
||||
@@ -483,13 +483,13 @@ Result Registration::EnableDebugForTitleId(u64 tid, Handle *out) {
|
||||
return ResultPmDebugHookInUse;
|
||||
}
|
||||
*out = g_debug_title_event->GetHandle();
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result Registration::EnableDebugForApplication(Handle *out) {
|
||||
g_debug_next_application = true;
|
||||
*out = g_debug_application_event->GetHandle();
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result Registration::DisableDebug(u32 which) {
|
||||
@@ -499,5 +499,5 @@ Result Registration::DisableDebug(u32 which) {
|
||||
if (which & 2) {
|
||||
g_debug_next_application = false;
|
||||
}
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ static u64 g_system_boost_size = 0;
|
||||
|
||||
/* Tries to set Resource limits for a category. */
|
||||
static Result SetResourceLimits(ResourceLimitUtils::ResourceLimitCategory category, u64 new_memory_size) {
|
||||
Result rc = 0;
|
||||
Result rc = ResultSuccess;
|
||||
u64 old_memory_size = g_resource_limits[category][LimitableResource_Memory];
|
||||
g_resource_limits[category][LimitableResource_Memory] = new_memory_size;
|
||||
for (unsigned int r = 0; r < 5; r++) {
|
||||
@@ -86,7 +86,7 @@ static Result SetResourceLimits(ResourceLimitUtils::ResourceLimitCategory catego
|
||||
|
||||
|
||||
static Result SetNewMemoryResourceLimit(ResourceLimitUtils::ResourceLimitCategory category, u64 new_memory_size) {
|
||||
Result rc = 0;
|
||||
Result rc = ResultSuccess;
|
||||
u64 old_memory_size = g_resource_limits[category][LimitableResource_Memory];
|
||||
g_resource_limits[category][LimitableResource_Memory] = new_memory_size;
|
||||
if (R_FAILED((rc = svcSetResourceLimitLimitValue(g_resource_limit_handles[category], LimitableResource_Memory, g_resource_limits[category][LimitableResource_Memory])))) {
|
||||
@@ -237,7 +237,7 @@ Handle ResourceLimitUtils::GetResourceLimitHandleByCategory(ResourceLimitCategor
|
||||
}
|
||||
|
||||
Result ResourceLimitUtils::BoostSystemMemoryResourceLimit(u64 boost_size) {
|
||||
Result rc = 0;
|
||||
Result rc = ResultSuccess;
|
||||
if (boost_size > g_memory_resource_limits[g_memory_limit_type][ResourceLimitCategory_Application]) {
|
||||
return ResultPmInvalidSize;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ Result ShellService::FinalizeExitedProcess(u64 pid) {
|
||||
return ResultPmNotExited;
|
||||
} else {
|
||||
Registration::FinalizeExitedProcess(proc);
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Result ShellService::ClearProcessNotificationFlag(u64 pid) {
|
||||
auto proc = Registration::GetProcess(pid);
|
||||
if (proc != NULL) {
|
||||
proc->flags &= ~PROCESSFLAGS_CRASHED;
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
} else {
|
||||
return ResultPmProcessNotFound;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ Result ShellService::GetApplicationProcessId(Out<u64> pid) {
|
||||
std::shared_ptr<Registration::Process> app_proc;
|
||||
if (Registration::HasApplicationProcess(&app_proc)) {
|
||||
pid.SetValue(app_proc->pid);
|
||||
return 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
return ResultPmProcessNotFound;
|
||||
}
|
||||
@@ -109,5 +109,5 @@ Result ShellService::BoostSystemThreadsResourceLimit() {
|
||||
/* Starting in 7.0.0, Nintendo reduces the number of system threads from 0x260 to 0x60, */
|
||||
/* Until this command is called to double that amount to 0xC0. */
|
||||
/* We will simply not reduce the number of system threads available for no reason. */
|
||||
return 0x0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user