summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-08-29 18:46:36 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-08-29 18:46:36 +0000
commit9cb6bc936df5ccc6eb1a4ffb26d4cf5e73a61706 (patch)
tree438c5240cc42a6092474e872c264bab46ae74c9b /sys/compat
parent2de67afd31776b3a20dea753edfbff93aed5b8cf (diff)
pread(2) / pwrite(2), regen
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/svr4/svr4_fcntl.c52
-rw-r--r--sys/compat/svr4/svr4_syscall.h4
-rw-r--r--sys/compat/svr4/svr4_syscallargs.h18
-rw-r--r--sys/compat/svr4/svr4_syscalls.c6
-rw-r--r--sys/compat/svr4/svr4_sysent.c10
5 files changed, 79 insertions, 11 deletions
diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c
index 91a269cc917..e2e96aa0076 100644
--- a/sys/compat/svr4/svr4_fcntl.c
+++ b/sys/compat/svr4/svr4_fcntl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_fcntl.c,v 1.7 1997/08/29 17:59:51 kstailey Exp $ */
+/* $OpenBSD: svr4_fcntl.c,v 1.8 1997/08/29 18:46:31 kstailey Exp $ */
/* $NetBSD: svr4_fcntl.c,v 1.14 1995/10/14 20:24:24 christos Exp $ */
/*
@@ -311,6 +311,56 @@ svr4_sys_access(p, v, retval)
}
int
+svr4_sys_pread(p, v, retval)
+ register struct proc *p;
+ void *v;
+ register_t *retval;
+{
+ struct svr4_sys_pread_args *uap = v;
+ struct sys_lseek_args lap;
+ struct sys_read_args rap;
+ int error;
+
+ SCARG(&lap, fd) = SCARG(uap, fd);
+ SCARG(&lap, offset) = SCARG(uap, off);
+ SCARG(&lap, whence) = SEEK_CUR;
+
+ if ((error = sys_lseek(p, &lap, retval)) != 0)
+ return error;
+
+ SCARG(&rap, fd) = SCARG(uap, fd);
+ SCARG(&rap, buf) = SCARG(uap, buf);
+ SCARG(&rap, nbyte) = SCARG(uap, nbyte);
+
+ return sys_read(p, &rap, retval);
+}
+
+int
+svr4_sys_pwrite(p, v, retval)
+ register struct proc *p;
+ void *v;
+ register_t *retval;
+{
+ struct svr4_sys_pwrite_args *uap = v;
+ struct sys_lseek_args lap;
+ struct sys_write_args wap;
+ int error;
+
+ SCARG(&lap, fd) = SCARG(uap, fd);
+ SCARG(&lap, offset) = SCARG(uap, off);
+ SCARG(&lap, whence) = SEEK_CUR;
+
+ if ((error = sys_lseek(p, &lap, retval)) != 0)
+ return error;
+
+ SCARG(&wap, fd) = SCARG(uap, fd);
+ SCARG(&wap, buf) = SCARG(uap, buf);
+ SCARG(&wap, nbyte) = SCARG(uap, nbyte);
+
+ return sys_write(p, &wap, retval);
+}
+
+int
svr4_sys_fcntl(p, v, retval)
register struct proc *p;
void *v;
diff --git a/sys/compat/svr4/svr4_syscall.h b/sys/compat/svr4/svr4_syscall.h
index ff845e90b74..40c13b17d89 100644
--- a/sys/compat/svr4/svr4_syscall.h
+++ b/sys/compat/svr4/svr4_syscall.h
@@ -2,7 +2,7 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.12 1997/03/28 22:03:49 kstailey Exp
+ * created from OpenBSD: syscalls.master,v 1.13 1997/08/29 18:45:52 kstailey Exp
*/
#define SVR4_SYS_syscall 0
@@ -120,6 +120,8 @@
#define SVR4_SYS_gettimeofday 156
#define SVR4_SYS_getitimer 157
#define SVR4_SYS_setitimer 158
+#define SVR4_SYS_pread 173
+#define SVR4_SYS_pwrite 174
#define SVR4_SYS_acl 185
#define SVR4_SYS_facl 200
#define SVR4_SYS_setreuid 202
diff --git a/sys/compat/svr4/svr4_syscallargs.h b/sys/compat/svr4/svr4_syscallargs.h
index ffb2eab06f5..3e7e9f0ecf7 100644
--- a/sys/compat/svr4/svr4_syscallargs.h
+++ b/sys/compat/svr4/svr4_syscallargs.h
@@ -2,7 +2,7 @@
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.12 1997/03/28 22:03:49 kstailey Exp
+ * created from OpenBSD: syscalls.master,v 1.13 1997/08/29 18:45:52 kstailey Exp
*/
#define syscallarg(x) union { x datum; register_t pad; }
@@ -319,6 +319,20 @@ struct svr4_sys_gettimeofday_args {
syscallarg(struct timeval *) tp;
};
+struct svr4_sys_pread_args {
+ syscallarg(int) fd;
+ syscallarg(void *) buf;
+ syscallarg(size_t) nbyte;
+ syscallarg(svr4_off_t) off;
+};
+
+struct svr4_sys_pwrite_args {
+ syscallarg(int) fd;
+ syscallarg(const void *) buf;
+ syscallarg(size_t) nbyte;
+ syscallarg(svr4_off_t) off;
+};
+
struct svr4_sys_acl_args {
syscallarg(char *) path;
syscallarg(int) cmd;
@@ -454,6 +468,8 @@ int svr4_sys_vhangup __P((struct proc *, void *, register_t *));
int svr4_sys_gettimeofday __P((struct proc *, void *, register_t *));
int sys_getitimer __P((struct proc *, void *, register_t *));
int sys_setitimer __P((struct proc *, void *, register_t *));
+int svr4_sys_pread __P((struct proc *, void *, register_t *));
+int svr4_sys_pwrite __P((struct proc *, void *, register_t *));
int svr4_sys_acl __P((struct proc *, void *, register_t *));
int svr4_sys_facl __P((struct proc *, void *, register_t *));
int compat_43_sys_setreuid __P((struct proc *, void *, register_t *));
diff --git a/sys/compat/svr4/svr4_syscalls.c b/sys/compat/svr4/svr4_syscalls.c
index 0fdba0514cc..46f9ca2a8b2 100644
--- a/sys/compat/svr4/svr4_syscalls.c
+++ b/sys/compat/svr4/svr4_syscalls.c
@@ -2,7 +2,7 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.12 1997/03/28 22:03:49 kstailey Exp
+ * created from OpenBSD: syscalls.master,v 1.13 1997/08/29 18:45:52 kstailey Exp
*/
char *svr4_syscallnames[] = {
@@ -195,8 +195,8 @@ char *svr4_syscallnames[] = {
"#170 (unimplemented lwp_cond_wait)", /* 170 = unimplemented lwp_cond_wait */
"#171 (unimplemented lwp_cond_signal)", /* 171 = unimplemented lwp_cond_signal */
"#172 (unimplemented lwp_cond_broadcast)", /* 172 = unimplemented lwp_cond_broadcast */
- "#173 (unimplemented pread)", /* 173 = unimplemented pread */
- "#174 (unimplemented pwrite)", /* 174 = unimplemented pwrite */
+ "pread", /* 173 = pread */
+ "pwrite", /* 174 = pwrite */
"#175 (unimplemented llseek)", /* 175 = unimplemented llseek */
"#176 (unimplemented inst_sync)", /* 176 = unimplemented inst_sync */
"#177 (unimplemented)", /* 177 = unimplemented */
diff --git a/sys/compat/svr4/svr4_sysent.c b/sys/compat/svr4/svr4_sysent.c
index d8fd38dc0d4..59fa33f58b4 100644
--- a/sys/compat/svr4/svr4_sysent.c
+++ b/sys/compat/svr4/svr4_sysent.c
@@ -2,7 +2,7 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.12 1997/03/28 22:03:49 kstailey Exp
+ * created from OpenBSD: syscalls.master,v 1.13 1997/08/29 18:45:52 kstailey Exp
*/
#include <sys/param.h>
@@ -405,10 +405,10 @@ struct sysent svr4_sysent[] = {
sys_nosys }, /* 171 = unimplemented lwp_cond_signal */
{ 0, 0,
sys_nosys }, /* 172 = unimplemented lwp_cond_broadcast */
- { 0, 0,
- sys_nosys }, /* 173 = unimplemented pread */
- { 0, 0,
- sys_nosys }, /* 174 = unimplemented pwrite */
+ { 4, s(struct svr4_sys_pread_args),
+ svr4_sys_pread }, /* 173 = pread */
+ { 4, s(struct svr4_sys_pwrite_args),
+ svr4_sys_pwrite }, /* 174 = pwrite */
{ 0, 0,
sys_nosys }, /* 175 = unimplemented llseek */
{ 0, 0,