summaryrefslogtreecommitdiffstats
path: root/sys/compat/freebsd32
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-06-16 22:05:56 +0000
committerkib <kib@FreeBSD.org>2011-06-16 22:05:56 +0000
commitd5407645c7c0985a143b3af0aab2d49f6948f215 (patch)
tree45d1a180df469a8a3112affdd47a0458ddee1ea5 /sys/compat/freebsd32
parent6e0462eab287b96bdd47d4b78142eca26fa56a69 (diff)
downloadFreeBSD-src-d5407645c7c0985a143b3af0aab2d49f6948f215.zip
FreeBSD-src-d5407645c7c0985a143b3af0aab2d49f6948f215.tar.gz
Implement compat32 for old lseek, for the a.out binaries on amd64.
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c13
-rw-r--r--sys/compat/freebsd32/syscalls.master3
2 files changed, 15 insertions, 1 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 23985d3..5b6e895 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -1416,6 +1416,19 @@ freebsd32_pwrite(struct thread *td, struct freebsd32_pwrite_args *uap)
return (pwrite(td, &ap));
}
+#ifdef COMPAT_43
+int
+ofreebsd32_lseek(struct thread *td, struct ofreebsd32_lseek_args *uap)
+{
+ struct lseek_args nuap;
+
+ nuap.fd = uap->fd;
+ nuap.offset = uap->offset;
+ nuap.whence = uap->whence;
+ return (lseek(td, &nuap));
+}
+#endif
+
int
freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap)
{
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index d524f3c..3e19298 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -89,7 +89,8 @@
18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \
struct statfs32 *buf, long bufsize, \
int flags); }
-19 AUE_LSEEK OBSOL olseek
+19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int offset, \
+ int whence); }
20 AUE_GETPID NOPROTO { pid_t getpid(void); }
21 AUE_MOUNT NOPROTO { int mount(char *type, char *path, \
int flags, caddr_t data); }
OpenPOWER on IntegriCloud