aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/filemon
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-02-27 21:08:27 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-02-27 21:08:27 +0000
commit5b83ad4bb4ef181ff624827e5722137987058a58 (patch)
tree6c83edbe424a5af01d7a955706b99cb5845771f0 /sys/dev/filemon
parent0f7aeab0e7b46c386f80765e30ac59ffb08fdd67 (diff)
downloadsrc-5b83ad4bb4ef181ff624827e5722137987058a58.tar.gz
src-5b83ad4bb4ef181ff624827e5722137987058a58.zip
Remove old compatibility checks.
MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=296148
Diffstat (limited to 'sys/dev/filemon')
-rw-r--r--sys/dev/filemon/filemon.c9
-rw-r--r--sys/dev/filemon/filemon_wrapper.c31
2 files changed, 1 insertions, 39 deletions
diff --git a/sys/dev/filemon/filemon.c b/sys/dev/filemon/filemon.c
index 352f68241ede..d0af8e46a6e6 100644
--- a/sys/dev/filemon/filemon.c
+++ b/sys/dev/filemon/filemon.c
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <sys/file.h>
#include <sys/systm.h>
#include <sys/buf.h>
+#include <sys/capsicum.h>
#include <sys/condvar.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
@@ -52,10 +53,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sysproto.h>
#include <sys/uio.h>
-#if __FreeBSD_version >= 900041
-#include <sys/capsicum.h>
-#endif
-
#include "filemon.h"
#if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32)
@@ -158,9 +155,7 @@ filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused,
int error = 0;
struct filemon *filemon;
struct proc *p;
-#if __FreeBSD_version >= 900041
cap_rights_t rights;
-#endif
if ((error = devfs_get_cdevpriv((void **) &filemon)) != 0)
return (error);
@@ -174,9 +169,7 @@ filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused,
fdrop(filemon->fp, td);
error = fget_write(td, *(int *)data,
-#if __FreeBSD_version >= 900041
cap_rights_init(&rights, CAP_PWRITE),
-#endif
&filemon->fp);
if (error == 0)
/* Write the file header. */
diff --git a/sys/dev/filemon/filemon_wrapper.c b/sys/dev/filemon/filemon_wrapper.c
index 7419ccb53703..a20ece50cf39 100644
--- a/sys/dev/filemon/filemon_wrapper.c
+++ b/sys/dev/filemon/filemon_wrapper.c
@@ -36,27 +36,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
-#if __FreeBSD_version > 800032
-#define FILEMON_HAS_LINKAT
-#endif
-
-#if __FreeBSD_version < 900044 /* r225617 (2011-09-16) failed to bump
- __FreeBSD_version. This really should
- be based on "900045". "900044" is r225469
- (2011-09-10) so this code is broken for
- 9-CURRENT September 10th-16th. */
-#define sys_chdir chdir
-#define sys_link link
-#define sys_open open
-#define sys_rename rename
-#define sys_stat stat
-#define sys_symlink symlink
-#define sys_unlink unlink
-#ifdef FILEMON_HAS_LINKAT
-#define sys_linkat linkat
-#endif
-#endif /* __FreeBSD_version */
-
static eventhandler_tag filemon_exec_tag;
static eventhandler_tag filemon_exit_tag;
static eventhandler_tag filemon_fork_tag;
@@ -347,7 +326,6 @@ filemon_wrapper_symlink(struct thread *td, struct symlink_args *uap)
return (ret);
}
-#ifdef FILEMON_HAS_LINKAT
static int
filemon_wrapper_linkat(struct thread *td, struct linkat_args *uap)
{
@@ -376,7 +354,6 @@ filemon_wrapper_linkat(struct thread *td, struct linkat_args *uap)
return (ret);
}
-#endif
static int
filemon_wrapper_stat(struct thread *td, struct stat_args *uap)
@@ -530,9 +507,7 @@ filemon_wrapper_install(void)
sv_table[SYS_unlink].sy_call = (sy_call_t *) filemon_wrapper_unlink;
sv_table[SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link;
sv_table[SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink;
-#ifdef FILEMON_HAS_LINKAT
sv_table[SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat;
-#endif
#if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32)
sv_table = ia32_freebsd_sysvec.sv_table;
@@ -545,9 +520,7 @@ filemon_wrapper_install(void)
sv_table[FREEBSD32_SYS_unlink].sy_call = (sy_call_t *) filemon_wrapper_unlink;
sv_table[FREEBSD32_SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link;
sv_table[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink;
-#ifdef FILEMON_HAS_LINKAT
sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat;
-#endif
#endif /* COMPAT_ARCH32 */
filemon_exec_tag = EVENTHANDLER_REGISTER(process_exec,
@@ -575,9 +548,7 @@ filemon_wrapper_deinstall(void)
sv_table[SYS_unlink].sy_call = (sy_call_t *)sys_unlink;
sv_table[SYS_link].sy_call = (sy_call_t *)sys_link;
sv_table[SYS_symlink].sy_call = (sy_call_t *)sys_symlink;
-#ifdef FILEMON_HAS_LINKAT
sv_table[SYS_linkat].sy_call = (sy_call_t *)sys_linkat;
-#endif
#if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32)
sv_table = ia32_freebsd_sysvec.sv_table;
@@ -590,9 +561,7 @@ filemon_wrapper_deinstall(void)
sv_table[FREEBSD32_SYS_unlink].sy_call = (sy_call_t *)sys_unlink;
sv_table[FREEBSD32_SYS_link].sy_call = (sy_call_t *)sys_link;
sv_table[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *)sys_symlink;
-#ifdef FILEMON_HAS_LINKAT
sv_table[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *)sys_linkat;
-#endif
#endif /* COMPAT_ARCH32 */
EVENTHANDLER_DEREGISTER(process_exec, filemon_exec_tag);