From 009086ed52942cdad2ed11b7fa0dbdf5d8063b83 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 27 Nov 2020 00:54:24 +0100 Subject: [PATCH] Implement IOCTL_KERN_WRITE32 in /dev/iosuhax --- source/ios_mcp/source/ipc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/ios_mcp/source/ipc.c b/source/ios_mcp/source/ipc.c index 52b446c..0c123d5 100644 --- a/source/ios_mcp/source/ipc.c +++ b/source/ios_mcp/source/ipc.c @@ -165,8 +165,11 @@ static int ipc_ioctl(ipcmessage *message) { break; } case IOCTL_KERN_WRITE32: { - //! TODO: add syscall as on kern_read32 - res = IOS_ERROR_NOEXISTS; + if ((message->ioctl.length_in < 8)) { + res = IOS_ERROR_INVALID_SIZE; + } else { + svcCustomKernelCommand(KERNEL_WRITE32, message->ioctl.buffer_in[0], message->ioctl.buffer_in[1]); + } break; } //!--------------------------------------------------------------------------------------------------------------