Re: My $0.02 on devd and devfs

Jeff Garzik (jgarzik@pobox.com)
Mon, 11 Oct 1999 17:55:16 -0400


Shawn Leas wrote:
>
> From: Jeff Garzik [mailto:jgarzik@pobox.com]
> Subject: Re: My $0.02 on devd and devfs
>
> >Khimenko Victor wrote:
> >> See above. Try to turn on printer, do `cat something > /dev/printer/0`
> with
> >> devfs and explain how it'll be handled with devd.
> >Are you implying here that /dev/printer/0 is created at open() time?
> >IMHO that is a bad idea.
>
> I think you're mis-understanding, and you didn't read the entire post.
> If the device node isn't there, devfs can locate the module needed,
> load it, and then the DRIVER, implicitely by having been loaded,
> puts it's device node into the namespace. (So to speak)

You seem to have repeated what I just said.

Does "/dev/printer/0" exist without the lp module being loaded?
If yes, that is wasteful like the current system.
If no, you must go outside normal filesystem semantics and talk to a
_non-existent_ inode as if it exists.

Drivers which are not explicitly hot-plug need some sort of "kick"
before the kernel knows it needs to load a module/driver. Having that
kick come in the form of open(), or worse stat(), is the part I don't
like. Creating a file implicitly like that just seems alien to the
traditional Unix fs.

Jeff

-- 
Custom driver development	|    Never worry about theory as long
Open source programming		|    as the machinery does what it's
				|    supposed to do.  -- R. A. Heinlein

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/