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

Re: [Minios-devel] [UNIKRAFT PATCH 08/10] lib/vfscore: syscall writev



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 04.06.19 18:28, Yuri Volchkov wrote:
First ever user of syscall shim layer

Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
  lib/vfscore/Makefile.uk   | 4 +++-
  lib/vfscore/exportsyms.uk | 1 +
  lib/vfscore/main.c        | 7 +++++++
  3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index 1fd35858..0166e612 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -15,4 +15,6 @@ LIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/lookup.c
  LIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/fops.c
  LIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/subr_uio.c
-EXTRA_LD_SCRIPT-$(CONFIG_LIBVFSCORE) += $(LIBVFSCORE_BASE)/extra.ld
\ No newline at end of file
+EXTRA_LD_SCRIPT-$(CONFIG_LIBVFSCORE) += $(LIBVFSCORE_BASE)/extra.ld
+
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += writev-3
diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk
index 34eeee59..da7fbaea 100644
--- a/lib/vfscore/exportsyms.uk
+++ b/lib/vfscore/exportsyms.uk
@@ -74,3 +74,4 @@ faccessat
  readlink
  fallocate
  lseek
+uk_syscall_writev
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index dfd43eb3..fff233f3 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -49,6 +49,7 @@
  #include <uk/errptr.h>
  #include <uk/ctors.h>
  #include <uk/trace.h>
+#include <uk/syscall.h>
#ifdef DEBUG_VFS
  int   vfs_debug = VFSDB_FLAGS;
@@ -458,6 +459,12 @@ ssize_t writev(int fd, const struct iovec *iov, int iovcnt)
        return pwritev(fd, iov, iovcnt, -1);
  }
+UK_SYSCALL_DEFINE(writev, unsigned long, fd, const struct iovec *, vec,
+                 unsigned long, vlen)
+{
+       return pwritev(fd, vec, vlen, -1);
+}
+
  UK_TRACEPOINT(trace_vfs_ioctl, "%d 0x%x", int, unsigned long);
  UK_TRACEPOINT(trace_vfs_ioctl_ret, "");
  UK_TRACEPOINT(trace_vfs_ioctl_err, "%d", int);


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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