Re: PROPOSAL: /proc/dev (new idea)

Patrick St. Jean (psj@cgmlarson.com)
Thu, 1 Jan 1998 09:05:00 -0600 (CST)


On Thu, 1 Jan 1998, Richard Gooch wrote:
> AFAIK, what I'm proposing is different from other proposals in the
> past, which involved complex user-space daemons creating device
> files/symlinks on-the-fly. I think /proc/dev is much cleaner than
> those proposed daemons.

May I make a suggestion? Has anyone ever looked at Solaris' device
handling? They have a directory called /devices where the _REAL_ devices
are (they use really ugly nasty names for them) and then the _KERNEL_ when
given a -r flag will recreate the symlinks in /dev. Why couldn't we do
something of that sort. But instead of nasyy, ugly names, just make /dev
the special directory... Forget /dev being a real directory on the disk,
just make it a "fake" one. When device blah initializes, he calls
create_dev_entry(major, start_minor, count, name). Major seems self
explanitory, start_minor is the first minor number, count is how many more
minors from there, and name is the "base" name (cua for example).
I know I'm blowing my own horn here, but it seems to me that this
approach has a few things going for it. 1: No userspace daemons linking,
etc. 2: Only devices you've got are seen. 3: If the pseudo-directory is
done right, you'll never see people messing up tar's and creating HUGE
files in /dev (pet peeve). 4: It keeps it out of /proc (see #1).
I can see some drawbacks to it that I do not know how to address, such
as permissions on the device files. I've got st0 at home set wide open so
that I don't have to su to read a tape. But there's gotta be a way around
something as trivial as that...

Just my $0.02

Happy new year!

-- 
+----------------------------------------------------------------------------+
| Patrick St. Jean              '97 XLH 883                psj@cgmlarson.com |
| Programmer & Systems Administrator                    +1 713-977-4177 x115 |
| Larson Software Technology                        http://www.cgmlarson.com |
+----------------------------------------------------------------------------+