summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/filemon/filemon.c8
-rw-r--r--sys/dev/filemon/filemon_wrapper.c12
2 files changed, 6 insertions, 14 deletions
diff --git a/sys/dev/filemon/filemon.c b/sys/dev/filemon/filemon.c
index d727455..919af9d 100644
--- a/sys/dev/filemon/filemon.c
+++ b/sys/dev/filemon/filemon.c
@@ -54,16 +54,12 @@ __FBSDID("$FreeBSD$");
#include "filemon.h"
-#if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32)
+#if defined(COMPAT_FREEBSD32)
#include <compat/freebsd32/freebsd32_syscall.h>
#include <compat/freebsd32/freebsd32_proto.h>
-
-extern struct sysentvec ia32_freebsd_sysvec;
+#include <compat/freebsd32/freebsd32_util.h>
#endif
-extern struct sysentvec elf32_freebsd_sysvec;
-extern struct sysentvec elf64_freebsd_sysvec;
-
static d_close_t filemon_close;
static d_ioctl_t filemon_ioctl;
static d_open_t filemon_open;
diff --git a/sys/dev/filemon/filemon_wrapper.c b/sys/dev/filemon/filemon_wrapper.c
index 5c4df61..6c71d27 100644
--- a/sys/dev/filemon/filemon_wrapper.c
+++ b/sys/dev/filemon/filemon_wrapper.c
@@ -39,10 +39,6 @@ __FBSDID("$FreeBSD$");
#include "opt_compat.h"
-#if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32)
-extern struct sysent freebsd32_sysent[];
-#endif
-
static eventhandler_tag filemon_exec_tag;
static eventhandler_tag filemon_exit_tag;
static eventhandler_tag filemon_fork_tag;
@@ -429,7 +425,7 @@ filemon_wrapper_install(void)
sysent[SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink;
sysent[SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat;
-#if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32)
+#if defined(COMPAT_FREEBSD32)
freebsd32_sysent[FREEBSD32_SYS_chdir].sy_call = (sy_call_t *) filemon_wrapper_chdir;
freebsd32_sysent[FREEBSD32_SYS_open].sy_call = (sy_call_t *) filemon_wrapper_open;
freebsd32_sysent[FREEBSD32_SYS_openat].sy_call = (sy_call_t *) filemon_wrapper_openat;
@@ -438,7 +434,7 @@ filemon_wrapper_install(void)
freebsd32_sysent[FREEBSD32_SYS_link].sy_call = (sy_call_t *) filemon_wrapper_link;
freebsd32_sysent[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *) filemon_wrapper_symlink;
freebsd32_sysent[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *) filemon_wrapper_linkat;
-#endif /* COMPAT_ARCH32 */
+#endif /* COMPAT_FREEBSD32 */
filemon_exec_tag = EVENTHANDLER_REGISTER(process_exec,
filemon_event_process_exec, NULL, EVENTHANDLER_PRI_LAST);
@@ -461,7 +457,7 @@ filemon_wrapper_deinstall(void)
sysent[SYS_symlink].sy_call = (sy_call_t *)sys_symlink;
sysent[SYS_linkat].sy_call = (sy_call_t *)sys_linkat;
-#if defined(COMPAT_IA32) || defined(COMPAT_FREEBSD32) || defined(COMPAT_ARCH32)
+#if defined(COMPAT_FREEBSD32)
freebsd32_sysent[FREEBSD32_SYS_chdir].sy_call = (sy_call_t *)sys_chdir;
freebsd32_sysent[FREEBSD32_SYS_open].sy_call = (sy_call_t *)sys_open;
freebsd32_sysent[FREEBSD32_SYS_openat].sy_call = (sy_call_t *)sys_openat;
@@ -470,7 +466,7 @@ filemon_wrapper_deinstall(void)
freebsd32_sysent[FREEBSD32_SYS_link].sy_call = (sy_call_t *)sys_link;
freebsd32_sysent[FREEBSD32_SYS_symlink].sy_call = (sy_call_t *)sys_symlink;
freebsd32_sysent[FREEBSD32_SYS_linkat].sy_call = (sy_call_t *)sys_linkat;
-#endif /* COMPAT_ARCH32 */
+#endif /* COMPAT_FREEBSD32 */
EVENTHANDLER_DEREGISTER(process_exec, filemon_exec_tag);
EVENTHANDLER_DEREGISTER(process_exit, filemon_exit_tag);
OpenPOWER on IntegriCloud