diff options
author | Jean-Baptiste Boric <jblbeurope@gmail.com> | 2021-12-12 11:49:29 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-12 21:48:50 +0100 |
commit | ee34340c6afd273b3c0759ca40c2729fa8365e27 (patch) | |
tree | 2fefcf7c7ad7f91cb0b33682d3616bc9a9f365c6 /Userland/DevTools | |
parent | 012d8d7f74cc9bb78a5ed927d2050fe2d306e473 (diff) | |
download | serenity-ee34340c6afd273b3c0759ca40c2729fa8365e27.zip |
UserspaceEmulator: Remove support for SC_select syscall
Diffstat (limited to 'Userland/DevTools')
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/Emulator.h | 1 | ||||
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp | 41 |
2 files changed, 0 insertions, 42 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.h b/Userland/DevTools/UserspaceEmulator/Emulator.h index fda1cd897b..a39e13b888 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator.h +++ b/Userland/DevTools/UserspaceEmulator/Emulator.h @@ -210,7 +210,6 @@ private: int virt$rmdir(FlatPtr path, size_t path_length); int virt$sched_getparam(pid_t, FlatPtr); int virt$sched_setparam(int, FlatPtr); - int virt$select(FlatPtr); int virt$sendfd(int, int); int virt$sendmsg(int sockfd, FlatPtr msg_addr, int flags); int virt$set_coredump_metadata(FlatPtr address); diff --git a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp index 5d30f6f93a..28f7672026 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp +++ b/Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp @@ -18,7 +18,6 @@ #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/poll.h> -#include <sys/select.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/time.h> @@ -203,8 +202,6 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3) return virt$sched_getparam(arg1, arg2); case SC_sched_setparam: return virt$sched_setparam(arg1, arg2); - case SC_select: - return virt$select(arg1); case SC_sendfd: return virt$sendfd(arg1, arg2); case SC_sendmsg: @@ -700,44 +697,6 @@ int Emulator::virt$sendmsg(int sockfd, FlatPtr msg_addr, int flags) return sendmsg(sockfd, &msg, flags); } -int Emulator::virt$select(FlatPtr params_addr) -{ - Syscall::SC_select_params params; - mmu().copy_from_vm(¶ms, params_addr, sizeof(params)); - - fd_set readfds {}; - fd_set writefds {}; - fd_set exceptfds {}; - struct timespec timeout; - u32 sigmask; - - if (params.readfds) - mmu().copy_from_vm(&readfds, (FlatPtr)params.readfds, sizeof(readfds)); - if (params.writefds) - mmu().copy_from_vm(&writefds, (FlatPtr)params.writefds, sizeof(writefds)); - if (params.exceptfds) - mmu().copy_from_vm(&exceptfds, (FlatPtr)params.exceptfds, sizeof(exceptfds)); - if (params.timeout) - mmu().copy_from_vm(&timeout, (FlatPtr)params.timeout, sizeof(timeout)); - if (params.sigmask) - mmu().copy_from_vm(&sigmask, (FlatPtr)params.sigmask, sizeof(sigmask)); - - int rc = pselect(params.nfds, &readfds, &writefds, &exceptfds, params.timeout ? &timeout : nullptr, params.sigmask ? &sigmask : nullptr); - if (rc < 0) - return -errno; - - if (params.readfds) - mmu().copy_to_vm((FlatPtr)params.readfds, &readfds, sizeof(readfds)); - if (params.writefds) - mmu().copy_to_vm((FlatPtr)params.writefds, &writefds, sizeof(writefds)); - if (params.exceptfds) - mmu().copy_to_vm((FlatPtr)params.exceptfds, &exceptfds, sizeof(exceptfds)); - if (params.timeout) - mmu().copy_to_vm((FlatPtr)params.timeout, &timeout, sizeof(timeout)); - - return rc; -} - int Emulator::virt$getsockopt(FlatPtr params_addr) { Syscall::SC_getsockopt_params params; |