Subject: Re: Testing for devices in kernel startup
To: Bill Studenmund <wrstuden@loki.stanford.edu>
From: David Brownlee <david@mono.org>
List: tech-kern
Date: 11/02/1996 11:48:21
	I think der Mouse posted a pr to do this a while back ...
	(Not in a position I can check the pr database right now :/

		David/abs	david@{mono.org,southern.com,mhm-internet.com}

System Manager: Southern Studios Ltd, PO Box 59, London N22 1AR.
Satisfied User: NetBSD, free Un*x {i386,sparc,mac68k,+more} 'www.netbsd.org'.
  System Admin: MHM Internet, 14 Barley Mow Passage, Chiswick, London W4 4PH.
         SysOP: Monochrome, Largest UK Internet BBS - 'telnet mono.org'.

On Fri, 1 Nov 1996, Bill Studenmund wrote:

> I've gotten kinda tired of seeing people run into problems from installing
> w/o building devices. I've done this once too. Since the people who hit
> this error are usually dependent on the net for support, I think it'd
> be nice if we could help them some.
> 
> My thought is to basically just lstat some device and make sure it exists
> and is a reasonable device. If it's not, then we print an error message
> suggesting you might want to make devices. If the kernel then soon
> crashes, there's a diagnostic message saying what to do.
> 
> My thought was to look at /dev/console, since, AFAIK, it should be a
> character device on all ports.
> 
> So two questions:
> 
> 1) what do people think? I envision a small change, just enough code to
> set up the lookup, do it, vn_stat, and then vn_put. And print a message.
> 
> 2) When would be a good time to do it? I.E. after namei will succede, but
> before we've tried to actually use something from /dev. I was thinking
> somewhere around swapinit() in kern/init_main.c (it doesn't seem to
> actualy look at /dev)
> 
> Take care,
> 
> Bill
>