1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

Stub out a bunch more functions to get closer to that sweet bash build.

This commit is contained in:
Andreas Kling 2018-11-11 10:38:33 +01:00
parent e48182d91b
commit f394e3486a
14 changed files with 114 additions and 1 deletions

View file

@ -1042,6 +1042,16 @@ int Process::sys$access(const char* pathname, int mode)
ASSERT_NOT_REACHED();
}
int Process::sys$fcntl(int fd, int cmd, dword extra_arg)
{
(void) cmd;
(void) extra_arg;
auto* descriptor = file_descriptor(fd);
if (!descriptor)
return -EBADF;
ASSERT_NOT_REACHED();
}
int Process::sys$fstat(int fd, Unix::stat* statbuf)
{
VALIDATE_USER_WRITE(statbuf, sizeof(Unix::stat));
@ -1453,6 +1463,29 @@ int Process::sys$setpgid(pid_t specified_pid, pid_t specified_pgid)
return 0;
}
int Process::sys$tcgetattr(int fd, Unix::termios* tp)
{
VALIDATE_USER_WRITE(tp, sizeof(Unix::termios));
auto* descriptor = file_descriptor(fd);
if (!descriptor)
return -EBADF;
if (!descriptor->isTTY())
return -ENOTTY;
ASSERT_NOT_REACHED();
}
int Process::sys$tcsetattr(int fd, int optional_actions, const Unix::termios* tp)
{
(void) optional_actions;
VALIDATE_USER_READ(tp, sizeof(Unix::termios));
auto* descriptor = file_descriptor(fd);
if (!descriptor)
return -EBADF;
if (!descriptor->isTTY())
return -ENOTTY;
ASSERT_NOT_REACHED();
}
pid_t Process::sys$tcgetpgrp(int fd)
{
auto* descriptor = file_descriptor(fd);