aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-10-09 22:27:24 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-10-09 22:27:24 +0000
commit459e3a7a3705b22279c7dadc25fb3b2439755ff9 (patch)
tree6e5e5724e2c917c59122ced27e7bfabd37cb5598
parentcc7a6f19d0f68391e7bca857edae090d6df8ed15 (diff)
Notes
-rw-r--r--sys/amd64/ia32/ia32_misc.c21
-rw-r--r--sys/amd64/ia32/syscalls.master6
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c21
-rw-r--r--sys/compat/freebsd32/syscalls.master6
-rw-r--r--sys/ia64/ia32/ia32_misc.c21
-rw-r--r--sys/ia64/ia32/syscalls.master6
6 files changed, 75 insertions, 6 deletions
diff --git a/sys/amd64/ia32/ia32_misc.c b/sys/amd64/ia32/ia32_misc.c
index 8b28bcee0a52e..b5dc006ce7001 100644
--- a/sys/amd64/ia32/ia32_misc.c
+++ b/sys/amd64/ia32/ia32_misc.c
@@ -26,6 +26,8 @@
* $FreeBSD$
*/
+#include "opt_compat.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -1080,6 +1082,25 @@ ia32_ftruncate(struct thread *td, struct ia32_ftruncate_args *uap)
return (ftruncate(td, &ap));
}
+#ifdef COMPAT_FREEBSD4
+int
+freebsd4_ia32_sendfile(struct thread *td,
+ struct freebsd4_ia32_sendfile_args *uap)
+{
+ struct freebsd4_sendfile_args ap;
+
+ SCARG(&ap, fd) = SCARG(uap, fd);
+ SCARG(&ap, s) = SCARG(uap, s);
+ SCARG(&ap, offset) = (SCARG(uap, offsetlo)
+ | ((off_t)SCARG(uap, offsethi) << 32));
+ SCARG(&ap, nbytes) = SCARG(uap, nbytes); /* XXX check */
+ SCARG(&ap, hdtr) = SCARG(uap, hdtr); /* XXX check */
+ SCARG(&ap, sbytes) = SCARG(uap, sbytes); /* XXX FIXME!! */
+ SCARG(&ap, flags) = SCARG(uap, flags);
+ return (freebsd4_sendfile(td, &ap));
+}
+#endif
+
int
ia32_sendfile(struct thread *td, struct ia32_sendfile_args *uap)
{
diff --git a/sys/amd64/ia32/syscalls.master b/sys/amd64/ia32/syscalls.master
index 3010aa55f5d64..09813b51977c0 100644
--- a/sys/amd64/ia32/syscalls.master
+++ b/sys/amd64/ia32/syscalls.master
@@ -475,7 +475,7 @@
334 MNOPROTO POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
335 NOPROTO BSD { int utrace(const void *addr, size_t len); }
; XXX note - bigendian is different
-336 MSTD BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo, \
+336 MCOMPAT4 BSD { int ia32_osendfile(int fd, int s, u_int32_t offsetlo,\
u_int32_t offsethi, size_t nbytes, \
struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
337 NOPROTO BSD { int kldsym(int fileid, int cmd, void *data); }
@@ -561,7 +561,9 @@
int len); }
391 NOPROTO BSD { int lchflags(const char *path, int flags); }
392 NOPROTO BSD { int uuidgen(struct uuid *store, int count); }
-393 UNIMPL NOHIDE nsendfile
+393 MSTD BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo, \
+ u_int32_t offsethi, size_t nbytes, \
+ struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
394 UNIMPL NOHIDE mac_syscall
395 UNIMPL NOHIDE nosys
396 UNIMPL NOHIDE nosys
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 8b28bcee0a52e..b5dc006ce7001 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -26,6 +26,8 @@
* $FreeBSD$
*/
+#include "opt_compat.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -1080,6 +1082,25 @@ ia32_ftruncate(struct thread *td, struct ia32_ftruncate_args *uap)
return (ftruncate(td, &ap));
}
+#ifdef COMPAT_FREEBSD4
+int
+freebsd4_ia32_sendfile(struct thread *td,
+ struct freebsd4_ia32_sendfile_args *uap)
+{
+ struct freebsd4_sendfile_args ap;
+
+ SCARG(&ap, fd) = SCARG(uap, fd);
+ SCARG(&ap, s) = SCARG(uap, s);
+ SCARG(&ap, offset) = (SCARG(uap, offsetlo)
+ | ((off_t)SCARG(uap, offsethi) << 32));
+ SCARG(&ap, nbytes) = SCARG(uap, nbytes); /* XXX check */
+ SCARG(&ap, hdtr) = SCARG(uap, hdtr); /* XXX check */
+ SCARG(&ap, sbytes) = SCARG(uap, sbytes); /* XXX FIXME!! */
+ SCARG(&ap, flags) = SCARG(uap, flags);
+ return (freebsd4_sendfile(td, &ap));
+}
+#endif
+
int
ia32_sendfile(struct thread *td, struct ia32_sendfile_args *uap)
{
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index 3010aa55f5d64..09813b51977c0 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -475,7 +475,7 @@
334 MNOPROTO POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
335 NOPROTO BSD { int utrace(const void *addr, size_t len); }
; XXX note - bigendian is different
-336 MSTD BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo, \
+336 MCOMPAT4 BSD { int ia32_osendfile(int fd, int s, u_int32_t offsetlo,\
u_int32_t offsethi, size_t nbytes, \
struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
337 NOPROTO BSD { int kldsym(int fileid, int cmd, void *data); }
@@ -561,7 +561,9 @@
int len); }
391 NOPROTO BSD { int lchflags(const char *path, int flags); }
392 NOPROTO BSD { int uuidgen(struct uuid *store, int count); }
-393 UNIMPL NOHIDE nsendfile
+393 MSTD BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo, \
+ u_int32_t offsethi, size_t nbytes, \
+ struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
394 UNIMPL NOHIDE mac_syscall
395 UNIMPL NOHIDE nosys
396 UNIMPL NOHIDE nosys
diff --git a/sys/ia64/ia32/ia32_misc.c b/sys/ia64/ia32/ia32_misc.c
index 8b28bcee0a52e..b5dc006ce7001 100644
--- a/sys/ia64/ia32/ia32_misc.c
+++ b/sys/ia64/ia32/ia32_misc.c
@@ -26,6 +26,8 @@
* $FreeBSD$
*/
+#include "opt_compat.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -1080,6 +1082,25 @@ ia32_ftruncate(struct thread *td, struct ia32_ftruncate_args *uap)
return (ftruncate(td, &ap));
}
+#ifdef COMPAT_FREEBSD4
+int
+freebsd4_ia32_sendfile(struct thread *td,
+ struct freebsd4_ia32_sendfile_args *uap)
+{
+ struct freebsd4_sendfile_args ap;
+
+ SCARG(&ap, fd) = SCARG(uap, fd);
+ SCARG(&ap, s) = SCARG(uap, s);
+ SCARG(&ap, offset) = (SCARG(uap, offsetlo)
+ | ((off_t)SCARG(uap, offsethi) << 32));
+ SCARG(&ap, nbytes) = SCARG(uap, nbytes); /* XXX check */
+ SCARG(&ap, hdtr) = SCARG(uap, hdtr); /* XXX check */
+ SCARG(&ap, sbytes) = SCARG(uap, sbytes); /* XXX FIXME!! */
+ SCARG(&ap, flags) = SCARG(uap, flags);
+ return (freebsd4_sendfile(td, &ap));
+}
+#endif
+
int
ia32_sendfile(struct thread *td, struct ia32_sendfile_args *uap)
{
diff --git a/sys/ia64/ia32/syscalls.master b/sys/ia64/ia32/syscalls.master
index 3010aa55f5d64..09813b51977c0 100644
--- a/sys/ia64/ia32/syscalls.master
+++ b/sys/ia64/ia32/syscalls.master
@@ -475,7 +475,7 @@
334 MNOPROTO POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
335 NOPROTO BSD { int utrace(const void *addr, size_t len); }
; XXX note - bigendian is different
-336 MSTD BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo, \
+336 MCOMPAT4 BSD { int ia32_osendfile(int fd, int s, u_int32_t offsetlo,\
u_int32_t offsethi, size_t nbytes, \
struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
337 NOPROTO BSD { int kldsym(int fileid, int cmd, void *data); }
@@ -561,7 +561,9 @@
int len); }
391 NOPROTO BSD { int lchflags(const char *path, int flags); }
392 NOPROTO BSD { int uuidgen(struct uuid *store, int count); }
-393 UNIMPL NOHIDE nsendfile
+393 MSTD BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo, \
+ u_int32_t offsethi, size_t nbytes, \
+ struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
394 UNIMPL NOHIDE mac_syscall
395 UNIMPL NOHIDE nosys
396 UNIMPL NOHIDE nosys