fs: remove ksys_dup()
ksys_dup() is used only at one place in the kernel, namely to duplicate fd 0 of /dev/console to stdout and stderr. The same functionality can be achieved by using functions already available within the kernel namespace. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
@@ -960,7 +960,7 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
|
||||
return ksys_dup3(oldfd, newfd, 0);
|
||||
}
|
||||
|
||||
int ksys_dup(unsigned int fildes)
|
||||
SYSCALL_DEFINE1(dup, unsigned int, fildes)
|
||||
{
|
||||
int ret = -EBADF;
|
||||
struct file *file = fget_raw(fildes);
|
||||
@@ -975,11 +975,6 @@ int ksys_dup(unsigned int fildes)
|
||||
return ret;
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE1(dup, unsigned int, fildes)
|
||||
{
|
||||
return ksys_dup(fildes);
|
||||
}
|
||||
|
||||
int f_dupfd(unsigned int from, struct file *file, unsigned flags)
|
||||
{
|
||||
int err;
|
||||
|
Reference in New Issue
Block a user