Re: PROPOSAL: /proc/dev

Richard Gooch (rgooch@atnf.CSIRO.AU)
Tue, 6 Jan 1998 12:07:17 +1100


Pavel Machek writes:
> Hi!
>
> > > - I think this is totally wrong for programs or people that check in /dev
> > > for a device before try to open it, or at least is a mess.
> > WHAT!!! The whole point of a virtual devfs is that you can do a "ls /dev"
> > to see what devices are currently accessable. And most actions on a divice
> > start with a call to open() (or mount()).
>
>
> Ok. You have device 'foobar' which you can load module for. It is not
> loaded, now. Which means /dev/foobar entry is not there. Now, some
> broken app goes and looks if /dev/foobar exists. If it does not, it
> will bail out, instead of opening it (which would cause /dev/foobar to
> be loaded.)

Huh? How does the application check? stat(2) or access(2)? That's
easily trapped, just as open(2) can be trapped.
If you mean an application used readdir() instead, well... that's
probably unwise anyway.

Regards,

Richard....