summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-09 05:46:27 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-09 05:46:27 +0000
commit7f060b1bfc4d5b75a832544e92ed060710fc2043 (patch)
tree0361ee28b19fac27b4973a197f10182a20019f85 /sys
parent57c352f0970dfab25dca4b72438aff877c2f6e31 (diff)
Fix up previous diff: use COMPAT_O48 instead of COMPAT_48, add option
to GENERIC, wrap compat_o48_sys_getdirentries() with an appropriate #ifdef, and use struct compat_o48_sys_getdirentries_args instead of struct sys_getdirentries_args.
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/GENERIC3
-rw-r--r--sys/kern/syscalls.conf4
-rw-r--r--sys/kern/syscalls.master4
-rw-r--r--sys/kern/vfs_syscalls.c8
4 files changed, 11 insertions, 8 deletions
diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC
index e21b4da02bb..a944c21c6d2 100644
--- a/sys/conf/GENERIC
+++ b/sys/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.180 2011/07/09 00:47:18 henning Exp $
+# $OpenBSD: GENERIC,v 1.181 2011/07/09 05:46:26 matthew Exp $
#
# Machine-independent option; used by all architectures for their
# GENERIC kernel
@@ -29,6 +29,7 @@ option SYSVSHM # System V-like memory sharing
option UVM_SWAP_ENCRYPT# support encryption of pages going to swap
option COMPAT_43 # Kernel compatibility with 4.3BSD
+option COMPAT_O48 # Kernel compatibility with OpenBSD 4.8
option LKM # loadable kernel modules
diff --git a/sys/kern/syscalls.conf b/sys/kern/syscalls.conf
index f021201247a..a00a694b5ce 100644
--- a/sys/kern/syscalls.conf
+++ b/sys/kern/syscalls.conf
@@ -1,11 +1,11 @@
-# $OpenBSD: syscalls.conf,v 1.13 2011/07/09 05:31:26 matthew Exp $
+# $OpenBSD: syscalls.conf,v 1.14 2011/07/09 05:46:26 matthew Exp $
# $NetBSD: syscalls.conf,v 1.2 1994/10/26 06:45:57 cgd Exp $
sysnames="syscalls.c"
sysnumhdr="../sys/syscall.h"
syssw="init_sysent.c"
sysarghdr="../sys/syscallargs.h"
-compatopts="compat_48"
+compatopts="compat_o48"
libcompatopts=""
switchname="sysent"
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index ac09479bf36..66f9d910907 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.116 2011/07/09 05:31:26 matthew Exp $
+; $OpenBSD: syscalls.master,v 1.117 2011/07/09 05:46:26 matthew Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -326,7 +326,7 @@
struct rlimit *rlp); }
195 STD { int sys_setrlimit(int which, \
const struct rlimit *rlp); }
-196 COMPAT_48 { int sys_getdirentries(int fd, char *buf, \
+196 COMPAT_O48 { int sys_getdirentries(int fd, char *buf, \
int count, long *basep); }
197 STD { void *sys_mmap(void *addr, size_t len, int prot, \
int flags, int fd, long pad, off_t pos); }
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index b3ea6b28e85..cac2668f5be 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.173 2011/07/09 05:31:26 matthew Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.174 2011/07/09 05:46:26 matthew Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -2730,10 +2730,11 @@ sys_getdirentries(struct proc *p, void *v, register_t *retval)
return error;
}
+#ifdef COMPAT_O48
int
-compat_48_sys_getdirentries(struct proc *p, void *v, register_t *retval)
+compat_o48_sys_getdirentries(struct proc *p, void *v, register_t *retval)
{
- struct sys_getdirentries_args /* {
+ struct compat_o48_sys_getdirentries_args /* {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(int) count;
@@ -2750,6 +2751,7 @@ compat_48_sys_getdirentries(struct proc *p, void *v, register_t *retval)
}
return error;
}
+#endif
/*
* Set the mode mask for creation of filesystem nodes.