[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH 10/10] lib/vfscore: Register `dup2` to syscall_shim



Registers `dup2` system call to syscall_shim library.

Signed-off-by: Constantin Raducanu <raducanu.costi@xxxxxxxxx>
---
 lib/vfscore/Makefile.uk   | 1 +
 lib/vfscore/exportsyms.uk | 2 ++
 lib/vfscore/main.c        | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index 0919de7..5906a40 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -43,3 +43,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += chdir-1
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fchdir-1
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += dup-1
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += dup3-3
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += dup2-2
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index ead0d9f..037537c 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -47,6 +47,8 @@ dup
 uk_syscall_e_dup
 uk_syscall_r_dup
 dup2
+uk_syscall_e_dup2
+uk_syscall_r_dup2
 dup3
 uk_syscall_e_dup3
 uk_syscall_r_dup3
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index dc8f9e2..7c61013 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -1474,7 +1474,7 @@ UK_SYSCALL_R_DEFINE(int, dup3, int, oldfd, int, newfd, 
int, flags)
        return error;
 }
 
-int dup2(int oldfd, int newfd)
+UK_SYSCALL_R_DEFINE(int, dup2, int, oldfd, int, newfd)
 {
        if (oldfd == newfd)
                return newfd;
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.