There's no need to make filemon specific to i386 and amd64. All

LP64 architectures define elf64_freebsd_sysvec and all ILP32
architectures define elf32_freebsd_sysvec.
This commit is contained in:
Marcel Moolenaar 2012-07-02 20:36:26 +00:00
parent dd4b2c09ac
commit 097f09bb98
2 changed files with 5 additions and 13 deletions

View File

@ -656,12 +656,10 @@ filemon_wrapper_vfork(struct thread *td, struct vfork_args *uap)
static void
filemon_wrapper_install(void)
{
#if defined(__i386__)
struct sysent *sv_table = elf32_freebsd_sysvec.sv_table;
#elif defined(__amd64__)
#if defined(__LP64__)
struct sysent *sv_table = elf64_freebsd_sysvec.sv_table;
#else
#error Machine type not supported
struct sysent *sv_table = elf32_freebsd_sysvec.sv_table;
#endif
sv_table[SYS_chdir].sy_call = (sy_call_t *) filemon_wrapper_chdir;
@ -702,12 +700,10 @@ filemon_wrapper_install(void)
static void
filemon_wrapper_deinstall(void)
{
#if defined(__i386__)
struct sysent *sv_table = elf32_freebsd_sysvec.sv_table;
#elif defined(__amd64__)
#if defined(__LP64__)
struct sysent *sv_table = elf64_freebsd_sysvec.sv_table;
#else
#error Machine type not supported
struct sysent *sv_table = elf32_freebsd_sysvec.sv_table;
#endif
sv_table[SYS_chdir].sy_call = (sy_call_t *)sys_chdir;

View File

@ -106,7 +106,7 @@ SUBDIR= \
fdc \
fdescfs \
${_fe} \
${_filemon} \
filemon \
firewire \
firmware \
${_fxp} \
@ -360,10 +360,6 @@ SUBDIR= \
${_zfs} \
zlib \
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
_filemon= filemon
.endif
.if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \
${MACHINE_CPUARCH} != "mips"
_syscons= syscons