summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2013-08-13 05:52:28 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2013-08-13 05:52:28 +0000
commitf2b95a621a9fd41d222844eda237f607eb14d49c (patch)
tree38d62981cd1caedc3a6a01713c2e4266107b7220 /sys/compat/linux
parentbee789b12305f3c5e594fe03c965e0786969eeb7 (diff)
Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/linux_misc.c11
-rw-r--r--sys/compat/linux/syscalls.master8
2 files changed, 9 insertions, 10 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 6b0f022f27d..d78c56f9989 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_misc.c,v 1.80 2013/05/10 10:31:16 pirofti Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.81 2013/08/13 05:52:21 guenther Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -1049,7 +1049,7 @@ linux_sys_readdir(p, v, retval)
*
* Note that this doesn't handle union-mounted filesystems.
*/
-int linux_readdir_callback(void *, struct dirent *, off_t);
+int linux_readdir_callback(void *, struct dirent *);
struct linux_readdir_callback_args {
caddr_t outp;
@@ -1059,10 +1059,9 @@ struct linux_readdir_callback_args {
};
int
-linux_readdir_callback(arg, bdp, cookie)
+linux_readdir_callback(arg, bdp)
void *arg;
struct dirent *bdp;
- off_t cookie;
{
struct linux_dirent64 idb64;
struct linux_dirent idb;
@@ -1082,7 +1081,7 @@ linux_readdir_callback(arg, bdp, cookie)
if (cb->is64bit) {
idb64.d_ino = (linux_ino64_t)bdp->d_fileno;
- idb64.d_off = (linux_off64_t)cookie;
+ idb64.d_off = (linux_off64_t)bdp->d_off;
idb64.d_reclen = (u_short)linux_reclen;
idb64.d_type = bdp->d_type;
strlcpy(idb64.d_name, bdp->d_name, sizeof(idb64.d_name));
@@ -1099,7 +1098,7 @@ linux_readdir_callback(arg, bdp, cookie)
idb.d_off = (linux_off_t)linux_reclen;
idb.d_reclen = (u_short)bdp->d_namlen;
} else {
- idb.d_off = (linux_off_t)cookie;
+ idb.d_off = (linux_off_t)bdp->d_off;
idb.d_reclen = (u_short)linux_reclen;
}
strlcpy(idb.d_name, bdp->d_name, sizeof(idb.d_name));
diff --git a/sys/compat/linux/syscalls.master b/sys/compat/linux/syscalls.master
index b80bd9c9cf5..911efc9a464 100644
--- a/sys/compat/linux/syscalls.master
+++ b/sys/compat/linux/syscalls.master
@@ -1,4 +1,4 @@
- $OpenBSD: syscalls.master,v 1.71 2012/06/19 11:35:29 pirofti Exp $
+ $OpenBSD: syscalls.master,v 1.72 2013/08/13 05:52:22 guenther Exp $
; $NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -144,7 +144,7 @@
76 STD { int linux_sys_getrlimit(u_int which, \
struct linux_rlimit *rlp); }
77 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
-78 NOARGS { int sys_gettimeofday(struct timeval *tp, \
+78 NOARGS { int t32_sys_gettimeofday(struct timeval *tp, \
struct timezone *tzp); }
79 NOARGS { int sys_settimeofday(struct timeval *tp, \
struct timezone *tzp); }
@@ -269,8 +269,8 @@
159 STD { int linux_sys_sched_get_priority_max(int policy); }
160 STD { int linux_sys_sched_get_priority_min(int policy); }
161 STD { int linux_sys_sched_rr_get_interval(void); }
-162 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
- struct timespec *rmtp); }
+162 NOARGS { int t32_sys_nanosleep(const struct timespec32 *rqtp, \
+ struct timespec32 *rmtp); }
163 STD { int linux_sys_mremap(void *old_address, \
size_t old_size, size_t new_size, long flags); }
164 STD { int linux_sys_setresuid16(u_int16_t ruid, \