From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 5 00:55:12 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 0108516A41F for ; Fri, 5 Aug 2005 00:55:12 +0000 (GMT) (envelope-from thib@mi.is) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43AD343D45 for ; Fri, 5 Aug 2005 00:55:11 +0000 (GMT) (envelope-from thib@mi.is) Received: from caulfield ([85.220.68.8] [85.220.68.8]) by quasar.skima.is; Fri, 5 Aug 2005 00:55:09 Z Date: Fri, 5 Aug 2005 00:55:43 +0000 From: "Thordur I. Bjornsson" To: hackers@freebsd.org Message-Id: <20050805005543.5bd947f2.thib@mi.is> Organization: n/a X-Mailer: Sylpheed version 1.0.5 (GTK+ 1.2.10; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: 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 00:55:12 -0000 Hello list. 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 ? And if it is and I want to do error checking e.g: if((sysctl(name, namelen, &val, NULL, 0)) != 0) { "Error in call to sysctl(3) blah blah blah"; } What would be the correct way to report,stop, &c ? This is propaply depentand on what I'm doing so... If this is A&A I'm sorry for the noize, I have not been able to find anything on google/archives. (It's late ;) -- Thordur I. Humppa!