From e6daf20a695ce566af7d4cc6bb5d41c639641a68 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 24 Feb 2014 17:16:17 +0100 Subject: [PATCH] 64-bit VFS_LSEEK_OFF Change-Id: Ic0b6d65cbde1033462b909436efa92464094f1ec --- include/minix/callnr.h | 3 +-- lib/libc/sys-minix/lseek.c | 5 ++--- servers/vfs/open.c | 7 +++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 71c291942..2627b8dca 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -293,8 +293,7 @@ /* Field names for the lseek(2) call. */ #define VFS_LSEEK_FD m2_i1 /* int */ -#define VFS_LSEEK_OFF_LO m2_l1 /* off_t (low 32 bits) */ -#define VFS_LSEEK_OFF_HI m2_l2 /* off_t (high 32 bits) */ +#define VFS_LSEEK_OFF m2_ll1 /* off_t */ #define VFS_LSEEK_WHENCE m2_i2 /* int */ /* Field names for the truncate(2) and ftruncate(2) calls. */ diff --git a/lib/libc/sys-minix/lseek.c b/lib/libc/sys-minix/lseek.c index a0bfc041a..947232b60 100644 --- a/lib/libc/sys-minix/lseek.c +++ b/lib/libc/sys-minix/lseek.c @@ -17,9 +17,8 @@ lseek(int fd, off_t offset, int whence) memset(&m, 0, sizeof(m)); m.VFS_LSEEK_FD = fd; - m.VFS_LSEEK_OFF_LO = ex64lo(offset); - m.VFS_LSEEK_OFF_HI = ex64hi(offset); + m.VFS_LSEEK_OFF = offset; m.VFS_LSEEK_WHENCE = whence; if (_syscall(VFS_PROC_NR, VFS_LSEEK, &m) < 0) return( (off_t) -1); - return( (off_t) make64(m.VFS_LSEEK_OFF_LO, m.VFS_LSEEK_OFF_HI)); + return( (off_t) m.VFS_LSEEK_OFF); } diff --git a/servers/vfs/open.c b/servers/vfs/open.c index 641224ebc..32deb9fa7 100644 --- a/servers/vfs/open.c +++ b/servers/vfs/open.c @@ -647,13 +647,12 @@ int do_lseek(void) int r; if ((r = actual_lseek(fp, job_m_in.VFS_LSEEK_FD, - job_m_in.VFS_LSEEK_WHENCE, make64(job_m_in.VFS_LSEEK_OFF_LO, - job_m_in.VFS_LSEEK_OFF_HI), &newpos)) != OK) + job_m_in.VFS_LSEEK_WHENCE, job_m_in.VFS_LSEEK_OFF, + &newpos)) != OK) return r; /* insert the new position into the output message */ - job_m_out.VFS_LSEEK_OFF_LO = ex64lo(newpos); - job_m_out.VFS_LSEEK_OFF_HI = ex64hi(newpos); + job_m_out.VFS_LSEEK_OFF = newpos; return OK; } -- 2.44.0