Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jun 2011 22:05:56 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223166 - head/sys/compat/freebsd32
Message-ID:  <201106162205.p5GM5uDA047758@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jun 16 22:05:56 2011
New Revision: 223166
URL: http://svn.freebsd.org/changeset/base/223166

Log:
  Implement compat32 for old lseek, for the a.out binaries on amd64.

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/compat/freebsd32/syscalls.master

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Thu Jun 16 22:00:59 2011	(r223165)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Thu Jun 16 22:05:56 2011	(r223166)
@@ -1416,6 +1416,19 @@ freebsd32_pwrite(struct thread *td, stru
 	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)
 {

Modified: head/sys/compat/freebsd32/syscalls.master
==============================================================================
--- head/sys/compat/freebsd32/syscalls.master	Thu Jun 16 22:00:59 2011	(r223165)
+++ head/sys/compat/freebsd32/syscalls.master	Thu Jun 16 22:05:56 2011	(r223166)
@@ -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); }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106162205.p5GM5uDA047758>