From 5a3fe67dc6f0d2eb0336c74b3c005036e6f24ce2 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 10 Nov 2003 20:57:18 +0000 Subject: [PATCH] The last major syscall separation commit completely broke our lseek() as well as the linux emulated lseek(). It's sheer luck that the system works at all :-). Fix lseek's 64 bit return value. --- sys/emulation/linux/linux_file.c | 6 +++--- sys/kern/vfs_syscalls.c | 6 +++--- sys/sys/kern_syscall.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/emulation/linux/linux_file.c b/sys/emulation/linux/linux_file.c index 41011568f8..f2291b39b3 100644 --- a/sys/emulation/linux/linux_file.c +++ b/sys/emulation/linux/linux_file.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_file.c,v 1.41.2.6 2003/01/06 09:19:43 fjoe Exp $ - * $DragonFly: src/sys/emulation/linux/linux_file.c,v 1.12 2003/10/21 01:05:09 daver Exp $ + * $DragonFly: src/sys/emulation/linux/linux_file.c,v 1.13 2003/11/10 20:57:16 dillon Exp $ */ #include "opt_compat.h" @@ -166,7 +166,7 @@ linux_lseek(struct linux_lseek_args *args) tmp_args.whence = args->whence; tmp_args.sysmsg_result = 0; error = lseek(&tmp_args); - args->sysmsg_result = tmp_args.sysmsg_result; + args->sysmsg_offset = tmp_args.sysmsg_offset; return error; } @@ -188,7 +188,7 @@ linux_llseek(struct linux_llseek_args *args) bsd_args.fd = args->fd; bsd_args.offset = off; bsd_args.whence = args->whence; - bsd_args.sysmsg_result = 0; + bsd_args.sysmsg_offset = 0; if ((error = lseek(&bsd_args))) return error; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index e6bfd32585..159a9be403 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -37,7 +37,7 @@ * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 * $FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.151.2.18 2003/04/04 20:35:58 tegge Exp $ - * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.23 2003/11/03 18:49:23 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.24 2003/11/10 20:57:18 dillon Exp $ */ #include @@ -1446,7 +1446,7 @@ unlink(struct unlink_args *uap) } int -kern_lseek(int fd, off_t offset, int whence, int *res) +kern_lseek(int fd, off_t offset, int whence, off_t *res) { struct thread *td = curthread; struct proc *p = td->td_proc; @@ -1491,7 +1491,7 @@ lseek(struct lseek_args *uap) int error; error = kern_lseek(uap->fd, uap->offset, uap->whence, - &uap->sysmsg_result); + &uap->sysmsg_offset); return (error); } diff --git a/sys/sys/kern_syscall.h b/sys/sys/kern_syscall.h index fc189cae39..9400dc8565 100644 --- a/sys/sys/kern_syscall.h +++ b/sys/sys/kern_syscall.h @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/kern_syscall.h,v 1.10 2003/11/03 15:57:34 daver Exp $ + * $DragonFly: src/sys/sys/kern_syscall.h,v 1.11 2003/11/10 20:57:17 dillon Exp $ */ #ifndef _SYS_KERN_SYSCALL_H_ @@ -119,7 +119,7 @@ int kern_ftruncate(int fd, off_t length); int kern_futimes(int fd, struct timeval *tptr); int kern_getdirentries(int fd, char *buf, u_int count, long *basep, int *res); int kern_link(struct nameidata *nd, struct nameidata *linknd); -int kern_lseek(int fd, off_t offset, int whence, int *res); +int kern_lseek(int fd, off_t offset, int whence, off_t *res); int kern_mkdir(struct nameidata *nd, int mode); int kern_mknod(struct nameidata *nd, int mode, int dev); int kern_open(struct nameidata *nd, int flags, int mode, int *res); -- 2.41.0