Re: DEVFSv50 and /dev/fb? (or /dev/fb/? ???)

Roderich Schupp (rsch@ExperTeam.de)
Thu, 6 Aug 1998 00:00:11 +0200


David Luyer <luyer@ucs.uwa.edu.au> said:
>> Richard you missed the whole point. Companies and clients read the FAQ
>> the run away screaming. All they see are this really "ugly" naming
>> scheme.
>> --
>> Terry L. Ridder
>> Blue Danube Software (Blaue Donau Software)
>
> Companies and clients use Solaris. I think that's all that needs to
> be said on that point.

Yes! Rave on...

> Now, if devfs is ugly compared to that, then yes, it doesn't really
> deserve to live. However I believe there is room for a /proc/dev
> populated only with real devices, with four major advantages;
> * you can instantly see what is there
> * faster directory searches
> * makes things a lot easier for builders of distributions
> * makes it a lot easier (for the user) when adding a new device/
> driver

You just described devfs. The reason that it isn't implemented
under /proc (though it is very similar to /proc in many ways)
is that when the concept was discussed on the list, Linus said
he didn't like the idea of a /proc subsystem, but wouldn't object
if it were done in a new fs.

On the whole "running away screaming" FAQ issue:
The FAQ was written by Richard (1) as an explanation
why devfs is needed (at a time when this was a hotly
debated topic) (2) to make it easy to try out devfs and
go back to living without it with no hussle in case you weren't
100% satisfied. The symlink stuff was meant for that,
but is obsolete now. I've tried devfs from a fairly early stage
and it never broke anything for me.

So here's the short version how to switch to using devfs
and live happily thereafter:

(1) Apply the patch, configure with
/dev filesystem support? Y
Disable major&minor support for devfs-capable drivers? N
Disable old device names? N
Disable old tty names? N
Automatically mount at boot? Y
and rebuild kernel (don't reboot yet)

(2) Save everything below /dev that's _not_ a block or character
device. Because devfs doesn't deal with it, it has to be
recreated (once and for all, see (4) below) by hand. Things
that fall into this category are symlinks like
/dev/fd -> /proc/self/fd, the FIFO /dev/initcl for init,
the socket /dev/log, the symlink /dev/mouse to your favorite pet etc.
For this, you might do something like

cd /dev
find * ! \( -type b -o -type c \) |
tar -cvf /tmp/save_dev.tar --files-from -

(3) Reboot. Now devfs is mounted on /dev and has created all
devices that are available on your system, both with old and
new style names.

(4) Restore the non-devices below /dev from the tar created in (2).

(5) Adjust any permissions you don't like (e.g. your serial ports
should be owned by uucp).

(6) Hook the supplied rc.devfs script into your /etc/rc?.d scripts
(both for boot and shutdown). From now one this script will take
care of (2),(4), and (5) (saving/restoring the non-devices and
adjusting permissions on devices).

THAT'S IT!

One day you might get adventurous and want to get rid of the
old names. Then - and only then - you will have to find all
places where these old names are used and replace 'em with
the new style names. These include: /etc/fstab, /etc/inittab,
/etc/XF86Config, PPP dialup scripts etc. Sometimes the old names
are buried in software (e.g. pseudo terminal allocation in libc),
so these programs need upgrades. But that's another story...

Cheers, Roderich

--
                "A man, a plan, a canal, Panama!"

Roderich Schupp mailto:rsch@ExperTeam.de ExperTeam GmbH http://www.experteam.de/ Munich, Germany linux:2.1.114

- 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.altern.org/andrebalsa/doc/lkml-faq.html