Module Name:    src
Committed By:   njoly
Date:           Wed Apr 30 17:23:45 UTC 2014

Modified Files:
        src/sys/compat/netbsd32: netbsd32.h netbsd32_fs.c netbsd32_netbsd.c
            syscalls.master

Log Message:
Do not use native off_t type under compat netbsd32, but a new
netbsd32_off_t that provide the expected alignment for 64bit types.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.185 -r1.186 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.98 -r1.99 src/sys/compat/netbsd32/syscalls.master

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.99 src/sys/compat/netbsd32/netbsd32.h:1.100
--- src/sys/compat/netbsd32/netbsd32.h:1.99	Mon Feb  3 17:03:16 2014
+++ src/sys/compat/netbsd32/netbsd32.h	Wed Apr 30 17:23:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.99 2014/02/03 17:03:16 manu Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.100 2014/04/30 17:23:45 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -166,6 +166,7 @@ typedef netbsd32_pointer_t netbsd32_fd_s
 typedef netbsd32_intptr_t netbsd32_semid_t;
 typedef netbsd32_pointer_t netbsd32_semidp_t;
 typedef netbsd32_uint64 netbsd32_dev_t;
+typedef netbsd32_int64 netbsd32_off_t;
 
 /* from <sys/uio.h> */
 typedef netbsd32_pointer_t netbsd32_iovecp_t;

Index: src/sys/compat/netbsd32/netbsd32_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.69 src/sys/compat/netbsd32/netbsd32_fs.c:1.70
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.69	Thu Oct 17 18:01:11 2013
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Wed Apr 30 17:23:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.69 2013/10/17 18:01:11 njoly Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.70 2014/04/30 17:23:45 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.69 2013/10/17 18:01:11 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.70 2014/04/30 17:23:45 njoly Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -634,7 +634,7 @@ netbsd32_preadv(struct lwp *l, const str
 		syscallarg(const netbsd32_iovecp_t) iovp;
 		syscallarg(int) iovcnt;
 		syscallarg(int) pad;
-		syscallarg(off_t) offset;
+		syscallarg(netbsd32_off_t) offset;
 	} */
 	file_t *fp;
 	struct vnode *vp;
@@ -680,7 +680,7 @@ netbsd32_pwritev(struct lwp *l, const st
 		syscallarg(const netbsd32_iovecp_t) iovp;
 		syscallarg(int) iovcnt;
 		syscallarg(int) pad;
-		syscallarg(off_t) offset;
+		syscallarg(netbsd32_off_t) offset;
 	} */
 	file_t *fp;
 	struct vnode *vp;

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.185 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.186
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.185	Sat Mar 22 08:15:25 2014
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Wed Apr 30 17:23:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.185 2014/03/22 08:15:25 maxv Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.186 2014/04/30 17:23:45 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.185 2014/03/22 08:15:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.186 2014/04/30 17:23:45 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -1363,7 +1363,7 @@ netbsd32_pread(struct lwp *l, const stru
 		syscallarg(netbsd32_voidp) buf;
 		syscallarg(netbsd32_size_t) nbyte;
 		syscallarg(int) PAD;
-		syscallarg(off_t) offset;
+		syscallarg(netbsd32_off_t) offset;
 	} */
 	struct sys_pread_args ua;
 
@@ -1383,7 +1383,7 @@ netbsd32_pwrite(struct lwp *l, const str
 		syscallarg(const netbsd32_voidp) buf;
 		syscallarg(netbsd32_size_t) nbyte;
 		syscallarg(int) PAD;
-		syscallarg(off_t) offset;
+		syscallarg(netbsd32_off_t) offset;
 	} */
 	struct sys_pwrite_args ua;
 
@@ -1519,7 +1519,7 @@ netbsd32_mmap(struct lwp *l, const struc
 		syscallarg(int) flags;
 		syscallarg(int) fd;
 		syscallarg(netbsd32_long) PAD;
-		syscallarg(off_t) pos;
+		syscallarg(netbsd32_off_t) pos;
 	} */
 	struct sys_mmap_args ua;
 	int error;
@@ -1582,7 +1582,7 @@ netbsd32_lseek(struct lwp *l, const stru
 	/* {
 		syscallarg(int) fd;
 		syscallarg(int) PAD;
-		syscallarg(off_t) offset;
+		syscallarg(netbsd32_off_t) offset;
 		syscallarg(int) whence;
 	} */
 	struct sys_lseek_args ua;
@@ -1617,7 +1617,7 @@ netbsd32_truncate(struct lwp *l, const s
 	/* {
 		syscallarg(const netbsd32_charp) path;
 		syscallarg(int) PAD;
-		syscallarg(off_t) length;
+		syscallarg(netbsd32_off_t) length;
 	} */
 	struct sys_truncate_args ua;
 
@@ -1633,7 +1633,7 @@ netbsd32_ftruncate(struct lwp *l, const 
 	/* {
 		syscallarg(int) fd;
 		syscallarg(int) PAD;
-		syscallarg(off_t) length;
+		syscallarg(netbsd32_off_t) length;
 	} */
 	struct sys_ftruncate_args ua;
 
@@ -2611,8 +2611,8 @@ netbsd32___posix_fadvise50(struct lwp *l
 	/* {
 		syscallarg(int) fd;
 		syscallarg(int) PAD;
-		syscallarg(off_t) offset;
-		syscallarg(off_t) len;
+		syscallarg(netbsd32_off_t) offset;
+		syscallarg(netbsd32_off_t) len;
 		syscallarg(int) advice;
 	} */
 

Index: src/sys/compat/netbsd32/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.98 src/sys/compat/netbsd32/syscalls.master:1.99
--- src/sys/compat/netbsd32/syscalls.master:1.98	Thu Oct 17 18:01:11 2013
+++ src/sys/compat/netbsd32/syscalls.master	Wed Apr 30 17:23:45 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.98 2013/10/17 18:01:11 njoly Exp $
+	$NetBSD: syscalls.master,v 1.99 2014/04/30 17:23:45 njoly Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -359,10 +359,10 @@
 172	UNIMPL
 173	STD		{ netbsd32_ssize_t|netbsd32||pread(int fd, \
 			    netbsd32_voidp buf, netbsd32_size_t nbyte, \
-			    int PAD, off_t offset); }
+			    int PAD, netbsd32_off_t offset); }
 174	STD		{ netbsd32_ssize_t|netbsd32||pwrite(int fd, \
 			    netbsd32_voidp buf, netbsd32_size_t nbyte, \
-			    int PAD, off_t offset); }
+			    int PAD, netbsd32_off_t offset); }
 #if defined(NTP) || !defined(_KERNEL_OPT)
 175	COMPAT_30	{ int|netbsd32||ntp_gettime( \
 			    netbsd32_ntptimeval50p_t ntvp); }
@@ -402,15 +402,15 @@
 			    netbsd32_longp basep); }
 197	STD		{ netbsd32_voidp|netbsd32||mmap(netbsd32_voidp addr, \
 			    netbsd32_size_t len, int prot, int flags, int fd, \
-			    netbsd32_long PAD, off_t pos); }
+			    netbsd32_long PAD, netbsd32_off_t pos); }
 198	INDIR		{ quad_t|netbsd32||___syscall(quad_t code, \
 			    ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); }
-199	STD		{ off_t|netbsd32||lseek(int fd, int PAD, off_t offset, \
-			    int whence); }
+199	STD		{ netbsd32_off_t|netbsd32||lseek(int fd, int PAD, \
+			    netbsd32_off_t offset, int whence); }
 200	STD		{ int|netbsd32||truncate(netbsd32_charp path, int PAD, \
-			    off_t length); }
+			    netbsd32_off_t length); }
 201	STD		{ int|netbsd32||ftruncate(int fd, int PAD, \
-			    off_t length); }
+			    netbsd32_off_t length); }
 202	STD		{ int|netbsd32||__sysctl(netbsd32_intp name, \
 			    u_int namelen, netbsd32_voidp old, \
 			    netbsd32_size_tp oldlenp, netbsd32_voidp new, \
@@ -583,10 +583,10 @@
 			    int pid); }
 289	STD		{ netbsd32_ssize_t|netbsd32||preadv(int fd, \
 			    netbsd32_iovecp_t iovp, int iovcnt, int PAD, \
-			    off_t offset); }
+			    netbsd32_off_t offset); }
 290	STD		{ netbsd32_ssize_t|netbsd32||pwritev(int fd, \
 			    netbsd32_iovecp_t iovp, int iovcnt, int PAD, \
-			    off_t offset); }
+			    netbsd32_off_t offset); }
 291	STD		{ int|netbsd32|14|sigaction(int signum, \
 			    netbsd32_sigactionp_t nsa, \
 			    netbsd32_sigactionp_t osa); }
@@ -705,7 +705,7 @@
 352	UNIMPL
 353	UNIMPL
 354	STD		{ int|netbsd32||fsync_range(int fd, int flags, \
-			    off_t start, off_t length); }
+			    netbsd32_off_t start, netbsd32_off_t length); }
 355	STD		{ int|netbsd32||uuidgen(netbsd32_uuidp_t store, \
 			    int count); }
 356	STD		{ int|netbsd32||getvfsstat(netbsd32_statvfsp_t buf, \
@@ -851,7 +851,7 @@
 415	UNIMPL
 
 416	STD 		{ int|netbsd32|50|posix_fadvise(int fd, int PAD, \
-			    off_t offset, off_t len, int advice); }
+			    netbsd32_off_t offset, netbsd32_off_t len, int advice); }
 417	STD 		{ int|netbsd32|50|select(int nd, \
 			    netbsd32_fd_setp_t in,  netbsd32_fd_setp_t ou, \
 			    netbsd32_fd_setp_t ex, netbsd32_timevalp_t tv); }

Reply via email to