Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2005 00:55:43 +0000
From:      "Thordur I. Bjornsson" <thib@mi.is>
To:        hackers@freebsd.org
Subject:   Checking sysctl values from within the kernel.
Message-ID:  <20050805005543.5bd947f2.thib@mi.is>

next in thread | raw e-mail | index | archive | help
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.	<bzthib@gmail.com>
Humppa!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050805005543.5bd947f2.thib>