summaryrefslogtreecommitdiff
path: root/DevTools/UserspaceEmulator/Emulator.cpp
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-10-24 11:24:50 +0330
committerAndreas Kling <kling@serenityos.org>2020-10-25 10:13:03 +0100
commit617c5ba0451ed021b19f6a99872cac4bc629e9d7 (patch)
treed6f13331cb0d5796d436553b605bea6a55062f14 /DevTools/UserspaceEmulator/Emulator.cpp
parent41aa78f6dec4d788c213de142a6a037297b7c8a8 (diff)
downloadserenity-617c5ba0451ed021b19f6a99872cac4bc629e9d7.zip
UserspaceEmulator: Add support for fchown
Diffstat (limited to 'DevTools/UserspaceEmulator/Emulator.cpp')
-rw-r--r--DevTools/UserspaceEmulator/Emulator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp
index e39b4a2480..d90a087d29 100644
--- a/DevTools/UserspaceEmulator/Emulator.cpp
+++ b/DevTools/UserspaceEmulator/Emulator.cpp
@@ -353,6 +353,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
return virt$chmod(arg1, arg2, arg3);
case SC_fchmod:
return virt$fchmod(arg1, arg2);
+ case SC_fchown:
+ return virt$fchown(arg1, arg2, arg3);
case SC_accept:
return virt$accept(arg1, arg2, arg3);
case SC_setsockopt:
@@ -505,6 +507,11 @@ int Emulator::virt$fchmod(int fd, mode_t mode)
return syscall(SC_fchmod, fd, mode);
}
+int Emulator::virt$fchown(int fd, uid_t uid, gid_t gid)
+{
+ return syscall(SC_fchown, fd, uid, gid);
+}
+
int Emulator::virt$setsockopt(FlatPtr params_addr)
{
Syscall::SC_setsockopt_params params;