summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-19 15:41:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-19 15:41:08 +0000
commit93befcf57380eafe63e453595cc78ad0521d87b6 (patch)
tree697ca9d86425c03e07afb367d2bde63a804fdf56 /sys
parentc570f8073ee1d4f21ec80a9f0709816a1dfa8969 (diff)
from fvdl; add msync(), readv() and writev()
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linux/linux_misc.c23
-rw-r--r--sys/compat/linux/linux_syscall.h7
-rw-r--r--sys/compat/linux/linux_syscallargs.h11
-rw-r--r--sys/compat/linux/linux_syscalls.c5
-rw-r--r--sys/compat/linux/linux_sysent.c8
-rw-r--r--sys/compat/linux/syscalls.master7
6 files changed, 54 insertions, 7 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index be0bdcc4986..7f0c693cf26 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.23 1995/12/09 04:01:42 mycroft Exp $ */
+/* $NetBSD: linux_misc.c,v 1.24 1995/12/18 14:35:08 fvdl Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
@@ -505,6 +505,27 @@ linux_sys_mmap(p, v, retval)
return sys_mmap(p, &cma, retval);
}
+int
+linux_sys_msync(p, v, retval)
+ struct proc *p;
+ void *v;
+ register_t *retval;
+{
+ struct linux_sys_msync_args /* {
+ syscallarg(caddr_t) addr;
+ syscallarg(int) len;
+ syscallarg(int) fl;
+ } */ *uap = v;
+
+ struct sys_msync_args bma;
+
+ /* flags are ignored */
+ SCARG(&bma, addr) = SCARG(uap, addr);
+ SCARG(&bma, len) = SCARG(uap, len);
+
+ return sys_msync(p, &bma, retval);
+}
+
/*
* This code is partly stolen from src/lib/libc/compat-43/times.c
* XXX - CLK_TCK isn't declared in /sys, just in <time.h>, done here
diff --git a/sys/compat/linux/linux_syscall.h b/sys/compat/linux/linux_syscall.h
index 4bc8e99b8e6..9975c899f30 100644
--- a/sys/compat/linux/linux_syscall.h
+++ b/sys/compat/linux/linux_syscall.h
@@ -2,7 +2,7 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.13 1995/10/07 06:27:15 mycroft Exp
+ * created from NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp
*/
#define LINUX_SYS_syscall 0
@@ -117,4 +117,7 @@
#define LINUX_SYS_getdents 141
#define LINUX_SYS_select 142
#define LINUX_SYS_flock 143
-#define LINUX_SYS_MAXSYSCALL 144
+#define LINUX_SYS_msync 144
+#define LINUX_SYS_readv 145
+#define LINUX_SYS_writev 146
+#define LINUX_SYS_MAXSYSCALL 147
diff --git a/sys/compat/linux/linux_syscallargs.h b/sys/compat/linux/linux_syscallargs.h
index eaa503f0d8f..b47f63a4874 100644
--- a/sys/compat/linux/linux_syscallargs.h
+++ b/sys/compat/linux/linux_syscallargs.h
@@ -2,7 +2,7 @@
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.14 1995/12/09 04:01:47 mycroft Exp
+ * created from NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp
*/
#define syscallarg(x) union { x datum; register_t pad; }
@@ -308,6 +308,12 @@ struct linux_sys_select_args {
syscallarg(struct timeval *) timeout;
};
+struct linux_sys_msync_args {
+ syscallarg(caddr_t) addr;
+ syscallarg(int) len;
+ syscallarg(int) fl;
+};
+
/*
* System call prototypes.
*/
@@ -431,3 +437,6 @@ int linux_sys_llseek __P((struct proc *, void *, register_t *));
int linux_sys_getdents __P((struct proc *, void *, register_t *));
int linux_sys_select __P((struct proc *, void *, register_t *));
int sys_flock __P((struct proc *, void *, register_t *));
+int linux_sys_msync __P((struct proc *, void *, register_t *));
+int sys_readv __P((struct proc *, void *, register_t *));
+int sys_writev __P((struct proc *, void *, register_t *));
diff --git a/sys/compat/linux/linux_syscalls.c b/sys/compat/linux/linux_syscalls.c
index 237014c11bf..5062a0fb5bf 100644
--- a/sys/compat/linux/linux_syscalls.c
+++ b/sys/compat/linux/linux_syscalls.c
@@ -2,7 +2,7 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.13 1995/10/07 06:27:15 mycroft Exp
+ * created from NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp
*/
char *linux_syscallnames[] = {
@@ -162,4 +162,7 @@ char *linux_syscallnames[] = {
"getdents", /* 141 = getdents */
"select", /* 142 = select */
"flock", /* 143 = flock */
+ "msync", /* 144 = msync */
+ "readv", /* 145 = readv */
+ "writev", /* 146 = writev */
};
diff --git a/sys/compat/linux/linux_sysent.c b/sys/compat/linux/linux_sysent.c
index b2fd1cbb220..db61518a095 100644
--- a/sys/compat/linux/linux_sysent.c
+++ b/sys/compat/linux/linux_sysent.c
@@ -2,7 +2,7 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.14 1995/12/09 04:01:47 mycroft Exp
+ * created from NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp
*/
#include <sys/param.h>
@@ -321,5 +321,11 @@ struct sysent linux_sysent[] = {
linux_sys_select }, /* 142 = select */
{ 2, s(struct sys_flock_args),
sys_flock }, /* 143 = flock */
+ { 3, s(struct linux_sys_msync_args),
+ linux_sys_msync }, /* 144 = msync */
+ { 3, s(struct sys_readv_args),
+ sys_readv }, /* 145 = readv */
+ { 3, s(struct sys_writev_args),
+ sys_writev }, /* 146 = writev */
};
diff --git a/sys/compat/linux/syscalls.master b/sys/compat/linux/syscalls.master
index eb2bf883da1..5e5ea73d16d 100644
--- a/sys/compat/linux/syscalls.master
+++ b/sys/compat/linux/syscalls.master
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.14 1995/12/09 04:01:47 mycroft Exp $
+ $NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -233,3 +233,8 @@
fd_set *writefds, fd_set *exceptfds, \
struct timeval *timeout); }
143 NOARGS { int sys_flock(int fd, int how); }
+144 STD { int linux_sys_msync(caddr_t addr, int len, int fl); }
+145 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
+ u_int iovcnt); }
+146 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
+ u_int iovcnt); }