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

[UNIKRAFT PATCH 7/8] lib/vfscore: Register `pipe` to syscall_shim



Registers `pipe` system call to syscall_shim library.

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

diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index fcd5c8c..25088b8 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -60,4 +60,5 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += stat-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += open-3
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += mkdir-2
 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += creat-2
-UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += symlink-2
\ No newline at end of file
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += symlink-2
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pipe-1
\ No newline at end of file
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index 413ea99..bb489ab 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -184,6 +184,8 @@ vn_stat
 vn_unlock
 vfs_busy
 pipe
+uk_syscall_e_pipe
+uk_syscall_r_pipe
 pipe2
 mkfifo
 futimes
diff --git a/lib/vfscore/pipe.c b/lib/vfscore/pipe.c
index 8d38296..e35862d 100644
--- a/lib/vfscore/pipe.c
+++ b/lib/vfscore/pipe.c
@@ -41,6 +41,7 @@
 #include <vfscore/mount.h>
 #include <vfscore/vnode.h>
 #include <uk/wait.h>
+#include <uk/syscall.h>
 #include <sys/ioctl.h>
 
 /* We use the default size in Linux kernel */
@@ -536,7 +537,7 @@ ERR_EXIT:
        return ret;
 }
 
-int pipe(int pipefd[2])
+UK_SYSCALL_R_DEFINE(int, pipe, int*, pipefd)
 {
        int ret = 0;
        int r_fd, w_fd;
-- 
2.17.1




 


Rackspace

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