mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
UserspaceEmulator: Implement the ftruncate and umask syscalls
It's now possible to copy files with FileManager running in UE. :^)
This commit is contained in:
parent
723effd051
commit
cf3d2411fa
2 changed files with 16 additions and 0 deletions
|
@ -534,6 +534,10 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
|
|||
return virt$allocate_tls(arg1);
|
||||
case SC_beep:
|
||||
return virt$beep();
|
||||
case SC_ftruncate:
|
||||
return virt$ftruncate(arg1, arg2);
|
||||
case SC_umask:
|
||||
return virt$umask(arg1);
|
||||
default:
|
||||
reportln("\n=={}== \033[31;1mUnimplemented syscall: {}\033[0m, {:p}", getpid(), Syscall::to_string((Syscall::Function)function), function);
|
||||
dump_backtrace();
|
||||
|
@ -708,6 +712,16 @@ int Emulator::virt$get_stack_bounds(FlatPtr base, FlatPtr size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Emulator::virt$ftruncate(int fd, off_t length)
|
||||
{
|
||||
return syscall(SC_ftruncate, fd, length);
|
||||
}
|
||||
|
||||
mode_t Emulator::virt$umask(mode_t mask)
|
||||
{
|
||||
return syscall(SC_umask, mask);
|
||||
}
|
||||
|
||||
int Emulator::virt$accept(int sockfd, FlatPtr address, FlatPtr address_length)
|
||||
{
|
||||
socklen_t host_address_length = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue