From owner-svn-src-head@FreeBSD.ORG Mon Dec 29 12:41:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52AF61065672; Mon, 29 Dec 2008 12:41:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3910B8FC12; Mon, 29 Dec 2008 12:41:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBTCfXHF057411; Mon, 29 Dec 2008 12:41:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTCfXIZ057410; Mon, 29 Dec 2008 12:41:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812291241.mBTCfXIZ057410@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 29 Dec 2008 12:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186562 - head/sys/fs/procfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 12:41:33 -0000 Author: kib Date: Mon Dec 29 12:41:32 2008 New Revision: 186562 URL: http://svn.freebsd.org/changeset/base/186562 Log: Use curproc->p_sysent->sv_flags bit SV_ILP32 for detection of the 32 bit caller, instead of direct comparision with ia32_freebsd_sysvec. Tested by: pho Approved by: des MFC after: 2 weeks Modified: head/sys/fs/procfs/procfs_map.c Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Mon Dec 29 12:12:23 2008 (r186561) +++ head/sys/fs/procfs/procfs_map.c Mon Dec 29 12:41:32 2008 (r186562) @@ -46,6 +46,9 @@ #include #include #include +#ifdef COMPAT_IA32 +#include +#endif #include #include @@ -59,15 +62,6 @@ #include #include -#ifdef COMPAT_IA32 -#include -#include -#include - -extern struct sysentvec ia32_freebsd_sysvec; -#endif - - #define MEBUFFERSIZE 256 /* @@ -104,8 +98,8 @@ procfs_doprocmap(PFS_FILL_ARGS) return (EOPNOTSUPP); #ifdef COMPAT_IA32 - if (curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) { - if (p->p_sysent != &ia32_freebsd_sysvec) + if (curproc->p_sysent->sv_flags & SV_ILP32) { + if (!(p->p_sysent->sv_flags & SV_ILP32)) return (EOPNOTSUPP); wrap32 = 1; }