use svcDuplicateHandle in handle override
This commit is contained in:
parent
2b4a219f87
commit
370707c663
@ -42,6 +42,7 @@ s32 svcUnmapMemoryBlock(Handle memblock, u32 addr);
|
||||
s32 svcWaitSynchronization(Handle handle, s64 nanoseconds);
|
||||
s32 svcWaitSynchronizationN(s32* out, Handle* handles, s32 handles_num, bool wait_all, s64 nanoseconds);
|
||||
s32 svcCloseHandle(Handle handle);
|
||||
s32 svcDuplicateHandle(Handle* out, Handle original);
|
||||
u64 svcGetSystemTick();
|
||||
s32 svcGetSystemInfo(s64* out, u32 type, s32 param);
|
||||
s32 svcGetProcessInfo(s64* out, Handle process, u32 type);
|
||||
|
@ -107,7 +107,7 @@ Result srvGetServiceHandle(Handle* out, char* name)
|
||||
Handle h = __get_handle_from_list(name);
|
||||
|
||||
if(h != 0) {
|
||||
*out = h; return 0;
|
||||
return svcDuplicateHandle(out, h);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -134,6 +134,15 @@ svcWaitSynchronizationN:
|
||||
ldr r5, [sp], #4
|
||||
bx lr
|
||||
|
||||
.global svcDuplicateHandle
|
||||
.type svcDuplicateHandle, %function
|
||||
svcDuplicateHandle:
|
||||
str r0, [sp,#-0x4]!
|
||||
svc 0x27
|
||||
ldr r3, [sp], #4
|
||||
str r1, [r3]
|
||||
bx lr
|
||||
|
||||
.global svcGetSystemTick
|
||||
.type svcGetSystemTick, %function
|
||||
svcGetSystemTick:
|
||||
|
Loading…
Reference in New Issue
Block a user