From cff2e749e23dc2fff20218ca74413a1ea7f46273 Mon Sep 17 00:00:00 2001 From: Paul Saab Date: Thu, 30 Jun 2005 17:17:29 +0000 Subject: [PATCH] Use SCTL_MASK32 to determine that the sysctl call is from a 32bit binary for kern.cp_time. Approved by: re --- sys/kern/kern_clock.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 76e2be6e3d4f..2194cbaeece9 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -37,7 +37,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_compat.h" #include "opt_hwpmc_hooks.h" #include "opt_ntp.h" #include "opt_watchdog.h" @@ -85,19 +84,15 @@ SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL) /* Some of these don't belong here, but it's easiest to concentrate them. */ long cp_time[CPUSTATES]; -#ifdef COMPAT_IA32 -extern struct sysentvec ia32_freebsd_sysvec; -#endif - static int sysctl_kern_cp_time(SYSCTL_HANDLER_ARGS) { int error; -#ifdef COMPAT_IA32 +#ifdef SCTL_MASK32 int i; unsigned int cp_time32[CPUSTATES]; - if (req->td->td_proc->p_sysent == &ia32_freebsd_sysvec) { + if (req->flags & SCTL_MASK32) { if (!req->oldptr) return SYSCTL_OUT(req, 0, sizeof(cp_time32)); for (i = 0; i < CPUSTATES; i++)