mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 17:14:28 -04:00
dmnt: refactor to use sts:: namespace.
This commit is contained in:
parent
a750e55f75
commit
78a730ddf6
36 changed files with 3684 additions and 4318 deletions
|
@ -14,41 +14,44 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include "dmnt_service.hpp"
|
||||
|
||||
Result DebugMonitorService::BreakDebugProcess(Handle debug_hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcBreakDebugProcess(debug_hnd);
|
||||
}
|
||||
namespace sts::dmnt {
|
||||
|
||||
Result DebugMonitorService::TerminateDebugProcess(Handle debug_hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcTerminateDebugProcess(debug_hnd);
|
||||
}
|
||||
Result DebugMonitorService::BreakDebugProcess(Handle debug_hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcBreakDebugProcess(debug_hnd);
|
||||
}
|
||||
|
||||
Result DebugMonitorService::CloseHandle(Handle debug_hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
/* This command is, entertainingly, also pretty unsafe in general... */
|
||||
return svcCloseHandle(debug_hnd);
|
||||
}
|
||||
Result DebugMonitorService::TerminateDebugProcess(Handle debug_hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcTerminateDebugProcess(debug_hnd);
|
||||
}
|
||||
|
||||
Result DebugMonitorService::GetProcessId(Out<u64> out_pid, Handle hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcGetProcessId(out_pid.GetPointer(), hnd);
|
||||
}
|
||||
Result DebugMonitorService::CloseHandle(Handle debug_hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
/* This command is, entertainingly, also pretty unsafe in general... */
|
||||
return svcCloseHandle(debug_hnd);
|
||||
}
|
||||
|
||||
Result DebugMonitorService::GetProcessHandle(Out<Handle> out_hnd, u64 pid) {
|
||||
R_TRY_CATCH(svcDebugActiveProcess(out_hnd.GetPointer(), pid)) {
|
||||
R_CATCH(ResultKernelAlreadyExists) {
|
||||
return ResultDebugAlreadyAttached;
|
||||
}
|
||||
} R_END_TRY_CATCH;
|
||||
Result DebugMonitorService::GetProcessId(Out<u64> out_pid, Handle hnd) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcGetProcessId(out_pid.GetPointer(), hnd);
|
||||
}
|
||||
|
||||
return ResultSuccess;
|
||||
}
|
||||
Result DebugMonitorService::GetProcessHandle(Out<Handle> out_hnd, u64 pid) {
|
||||
R_TRY_CATCH(svcDebugActiveProcess(out_hnd.GetPointer(), pid)) {
|
||||
R_CATCH(ResultKernelAlreadyExists) {
|
||||
return ResultDebugAlreadyAttached;
|
||||
}
|
||||
} R_END_TRY_CATCH;
|
||||
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result DebugMonitorService::WaitSynchronization(Handle hnd, u64 ns) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcWaitSynchronizationSingle(hnd, ns);
|
||||
}
|
||||
|
||||
Result DebugMonitorService::WaitSynchronization(Handle hnd, u64 ns) {
|
||||
/* Nintendo discards the output of this command, but we will return it. */
|
||||
return svcWaitSynchronizationSingle(hnd, ns);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue