lkml.org 
[lkml]   [1999]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Devfs, was Re: Migrating to larger numbers
On Wed, 9 Jun 1999, Richard Gooch wrote:

> It is the right way. The concept is still valid. Just extend my
> example code. It wasn't meant to be complete, just enough to convey
> the idea. Did I really have to spell that out?

Why not improve slightly devfs to have subdirectories such as "cdroms" (by
classes of devices ["it's a CDROM"], not classes of interfaces ["it's a
cdrom which you plug through USB"]), which would contain symlinks to the
directories which might hold cdrom devices ?
(ie : /dev/cdroms having the following symlinks :
/dev/ide/cd
/dev/sr
/dev/usb/cd
...
)
Now, a program wanting to enumerate cdroms would just do something in the
lines of
for cddir in readdir("/dev/cdrom"):
for cd in readdir(cddir):
#do something useful
Whoopla, this is pretty much static, so it may very well belong to the tar
solution, devfsd or an init script.

-- Cyrille

------------------------------------------------------------------
camembert * reblochon * brie * roquefort * munster * corsu uru * port-salut



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

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.121 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site