diff options
Diffstat (limited to 'DevTools/UserspaceEmulator/Emulator.cpp')
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp index ce88544dae..e39b4a2480 100644 --- a/DevTools/UserspaceEmulator/Emulator.cpp +++ b/DevTools/UserspaceEmulator/Emulator.cpp @@ -349,6 +349,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3) return virt$dbgputstr(arg1, arg2); case SC_dbgputch: return virt$dbgputch(arg1); + case SC_chmod: + return virt$chmod(arg1, arg2, arg3); case SC_fchmod: return virt$fchmod(arg1, arg2); case SC_accept: @@ -492,6 +494,12 @@ int Emulator::virt$dbgputstr(FlatPtr characters, int length) return 0; } +int Emulator::virt$chmod(FlatPtr path_addr, size_t path_length, mode_t mode) +{ + auto path = mmu().copy_buffer_from_vm(path_addr, path_length); + return syscall(SC_chmod, path.data(), path.size(), mode); +} + int Emulator::virt$fchmod(int fd, mode_t mode) { return syscall(SC_fchmod, fd, mode); |