pm/kern: update for 14.0.0

This commit is contained in:
Michael Scire 2022-03-21 23:52:16 -07:00 committed by SciresM
parent 0cfc93d423
commit e05df99342
23 changed files with 260 additions and 96 deletions

View file

@ -22,20 +22,20 @@ namespace ams::pm {
/* Actual command implementations. */
Result DebugMonitorService::GetModuleIdList(sf::Out<u32> out_count, const sf::OutBuffer &out_buf, u64 unused) {
R_UNLESS(out_buf.GetSize() <= std::numeric_limits<s32>::max(), pm::ResultInvalidSize());
return impl::GetModuleIdList(out_count.GetPointer(), out_buf.GetPointer(), out_buf.GetSize(), unused);
R_RETURN(impl::GetModuleIdList(out_count.GetPointer(), out_buf.GetPointer(), out_buf.GetSize(), unused));
}
Result DebugMonitorService::GetExceptionProcessIdList(sf::Out<u32> out_count, const sf::OutArray<os::ProcessId> &out_process_ids) {
R_UNLESS(out_process_ids.GetSize() <= std::numeric_limits<s32>::max(), pm::ResultInvalidSize());
return impl::GetExceptionProcessIdList(out_count.GetPointer(), out_process_ids.GetPointer(), out_process_ids.GetSize());
R_RETURN(impl::GetExceptionProcessIdList(out_count.GetPointer(), out_process_ids.GetPointer(), out_process_ids.GetSize()));
}
Result DebugMonitorService::StartProcess(os::ProcessId process_id) {
return impl::StartProcess(process_id);
R_RETURN(impl::StartProcess(process_id));
}
Result DebugMonitorService::GetProcessId(sf::Out<os::ProcessId> out, ncm::ProgramId program_id) {
return impl::GetProcessId(out.GetPointer(), program_id);
R_RETURN(impl::GetProcessId(out.GetPointer(), program_id));
}
Result DebugMonitorService::HookToCreateProcess(sf::OutCopyHandle out_hook, ncm::ProgramId program_id) {
@ -43,11 +43,11 @@ namespace ams::pm {
R_TRY(impl::HookToCreateProcess(std::addressof(event_handle), program_id));
out_hook.SetValue(event_handle, false);
return ResultSuccess();
R_SUCCEED();
}
Result DebugMonitorService::GetApplicationProcessId(sf::Out<os::ProcessId> out) {
return impl::GetApplicationProcessId(out.GetPointer());
R_RETURN(impl::GetApplicationProcessId(out.GetPointer()));
}
Result DebugMonitorService::HookToCreateApplicationProcess(sf::OutCopyHandle out_hook) {
@ -55,11 +55,15 @@ namespace ams::pm {
R_TRY(impl::HookToCreateApplicationProcess(std::addressof(event_handle)));
out_hook.SetValue(event_handle, false);
return ResultSuccess();
R_SUCCEED();
}
Result DebugMonitorService::ClearHook(u32 which) {
return impl::ClearHook(which);
R_RETURN(impl::ClearHook(which));
}
Result DebugMonitorService::GetProgramId(sf::Out<ncm::ProgramId> out, os::ProcessId process_id) {
R_RETURN(impl::GetProgramId(out.GetPointer(), process_id));
}
/* Atmosphere extension commands. */
@ -68,11 +72,11 @@ namespace ams::pm {
R_TRY(impl::AtmosphereGetProcessInfo(std::addressof(process_handle), out_loc.GetPointer(), out_status.GetPointer(), process_id));
out_process_handle.SetValue(process_handle, false);
return ResultSuccess();
R_SUCCEED();
}
Result DebugMonitorService::AtmosphereGetCurrentLimitInfo(sf::Out<s64> out_cur_val, sf::Out<s64> out_lim_val, u32 group, u32 resource) {
return impl::AtmosphereGetCurrentLimitInfo(out_cur_val.GetPointer(), out_lim_val.GetPointer(), group, resource);
R_RETURN(impl::AtmosphereGetCurrentLimitInfo(out_cur_val.GetPointer(), out_lim_val.GetPointer(), group, resource));
}
}