summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRummskartoffel <Rummskartoffel@protonmail.com>2022-01-26 10:52:45 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-29 11:22:43 +0100
commitb393fe573d8108ed8f61bb1ceed06628b8c5ec49 (patch)
treeb84d4ea3c8674908dcc2356686578fe801440756
parent0c88a53d4c650539c69478e8dff418a76594e707 (diff)
downloadserenity-b393fe573d8108ed8f61bb1ceed06628b8c5ec49.zip
UserspaceEmulator: Implement ioctl FIONBIO
-rw-r--r--Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
index 6cf2cea216..a0418c3fdd 100644
--- a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
+++ b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2022, Rummskartoffel <Rummskartoffel@protonmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -1151,6 +1152,11 @@ int Emulator::virt$ioctl([[maybe_unused]] int fd, unsigned request, [[maybe_unus
}
case FB_IOCTL_SET_HEAD_VERTICAL_OFFSET_BUFFER:
return syscall(SC_ioctl, fd, request, arg);
+ case FIONBIO: {
+ int enabled;
+ mmu().copy_from_vm(&enabled, arg, sizeof(int));
+ return syscall(SC_ioctl, fd, request, &enabled);
+ }
default:
reportln("Unsupported ioctl: {}", request);
dump_backtrace();