From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 5 14:50:52 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C918B16A41F for ; Fri, 5 Aug 2005 14:50:52 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57D1343D49 for ; Fri, 5 Aug 2005 14:50:52 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j75Eok4j029663; Fri, 5 Aug 2005 09:50:46 -0500 (CDT) (envelope-from dan) Date: Fri, 5 Aug 2005 09:50:46 -0500 From: Dan Nelson To: "Thordur I. Bjornsson" Message-ID: <20050805145046.GB78669@dan.emsphone.com> References: <20050805005543.5bd947f2.thib@mi.is> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050805005543.5bd947f2.thib@mi.is> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org Subject: Re: Checking sysctl values from within the kernel. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2005 14:50:52 -0000 In the last episode (Aug 05), Thordur I. Bjornsson said: > If I want to check a sysctl value from within the kernel (e.g. an > KLD), should I use the system calls described in sysctl(3) ? > > If not, what is the propper way to do so ? Since most sysctls are direct mappings onto integer variables in the kernel, just check the variable directly. -- Dan Nelson dnelson@allantgroup.com