Re: Devfs, was Re: Migrating to larger numbers

Richard Gooch (rgooch@atnf.csiro.au)
Wed, 9 Jun 1999 11:02:58 +1000


Alan Cox writes:
> > Are your concerns related to the devfs concept or to the particular
> > naming scheme?
>
> The concept.

Anything specific? It provides all kinds of neat tricks. For example,
if all your CD-ROMs devices are unloaded and you have module
autoloading, then to find all CD-ROMs on the system, you just do:
opendir ("/dev/ide/cd");
loop;
opendir ("/dev/sr");
loop;

and your directory scanning code knows that each and every entry
(besides "." and "..":-) is a Genuine CD-ROM[tm] that actually exists
on your system. No need to process a large directory, speculatively
opening device nodes to see if there's some hardware behind them.

Regards,

Richard....

-
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/