summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-16 11:23:11 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-16 11:34:01 +0200
commit2dc051c86615584ba32a3716f4488e8a158db179 (patch)
tree1a9521b13fdfd5edf251125111b62b28bccbaa1e
parent426c4e387da02a12bb0a6271677a538d3f856f94 (diff)
downloadserenity-2dc051c86615584ba32a3716f4488e8a158db179.zip
Kernel: Remove sys$getdtablesize()
I'm not sure why this was a syscall. If we need this we can add it in LibC as a wrapper around sysconf(_SC_OPEN_MAX).
-rw-r--r--Kernel/Process.cpp6
-rw-r--r--Kernel/Process.h1
-rw-r--r--Kernel/Syscall.h1
-rw-r--r--Libraries/LibC/unistd.cpp6
-rw-r--r--Libraries/LibC/unistd.h1
5 files changed, 0 insertions, 15 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 24dc7b9e4f..0ea945c842 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -2653,12 +2653,6 @@ int Process::sys$ioctl(int fd, unsigned request, unsigned arg)
return description->file().ioctl(*description, request, arg);
}
-int Process::sys$getdtablesize()
-{
- REQUIRE_PROMISE(stdio);
- return m_max_open_file_descriptors;
-}
-
int Process::sys$dup(int old_fd)
{
REQUIRE_PROMISE(stdio);
diff --git a/Kernel/Process.h b/Kernel/Process.h
index d746dc015c..851b92b27f 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -229,7 +229,6 @@ public:
int sys$ptsname_r(int fd, char*, ssize_t);
pid_t sys$fork(RegisterState&);
int sys$execve(const Syscall::SC_execve_params*);
- int sys$getdtablesize();
int sys$dup(int oldfd);
int sys$dup2(int oldfd, int newfd);
int sys$sigaction(int signum, const sigaction* act, sigaction* old_act);
diff --git a/Kernel/Syscall.h b/Kernel/Syscall.h
index 44f6f0a7d5..15bc2c31c2 100644
--- a/Kernel/Syscall.h
+++ b/Kernel/Syscall.h
@@ -80,7 +80,6 @@ namespace Kernel {
__ENUMERATE_SYSCALL(execve) \
__ENUMERATE_SYSCALL(geteuid) \
__ENUMERATE_SYSCALL(getegid) \
- __ENUMERATE_SYSCALL(getdtablesize) \
__ENUMERATE_SYSCALL(dup) \
__ENUMERATE_SYSCALL(dup2) \
__ENUMERATE_SYSCALL(sigaction) \
diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp
index da52fa5fd4..652eaabe43 100644
--- a/Libraries/LibC/unistd.cpp
+++ b/Libraries/LibC/unistd.cpp
@@ -417,12 +417,6 @@ int isatty(int fd)
return tcgetattr(fd, &dummy) == 0;
}
-int getdtablesize()
-{
- int rc = syscall(SC_getdtablesize);
- __RETURN_WITH_ERRNO(rc, rc, -1);
-}
-
int dup(int old_fd)
{
int rc = syscall(SC_dup, old_fd);
diff --git a/Libraries/LibC/unistd.h b/Libraries/LibC/unistd.h
index 7ed9ebeee8..433ee2f666 100644
--- a/Libraries/LibC/unistd.h
+++ b/Libraries/LibC/unistd.h
@@ -113,7 +113,6 @@ int link(const char* oldpath, const char* newpath);
int unlink(const char* pathname);
int symlink(const char* target, const char* linkpath);
int rmdir(const char* pathname);
-int getdtablesize();
int dup(int old_fd);
int dup2(int old_fd, int new_fd);
int pipe(int pipefd[2]);