Subject: Re: when to sysctl and when not to?
To: Simon Burge <simonb@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 06/15/2000 20:40:06
On Fri, Jun 16, 2000 at 01:25:08PM +1000, Simon Burge wrote:

 > 	if (memf == NULL || nlistf == NULL)
 > 		do sysctl stuff
 > 	else
 > 		do kvm stuff
 > 
 > Should that first check be just
 > 
 > 	if (memf == NULL)

Yes, just the memf ... if you're not specifying an alternate
memory file, by definition you are working on a live kernel.

The alternate nlist check was for people who booted /netbsd.test
and still wanted to ps(1) against it, etc.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>