But -- I think devfs mounted on /devices does this nicely for you. If
you ls -al there, you have listing with names in the right and
major/minor on the left.
> It also deal with the problem that symlinks into /devices doesn't solve:
> the permissions problem. By using real, traditional block/character
> mode device files in /dev, we can solve the ownership/group/permissions
> problem extremely easily.
Ok, and what is the problem with daemon looking into /devices, finding
out their minor/major numbers, and then mknod()-ing same devices with
correct permissions in /dev? I can see this doable with devfs. (And
yes, you have additional advantage of being able to mount /devices
over /dev if you decide not to use any daemon).
> As far as trying to find all of the CD-ROM's present in the system, or
> all of the some particular type of device, if applications really badly
> need this sort of thing, it's a really bad idea to tell them that they
> can do this by scanning /dev in some fashion. That would lock us into
> that way of doing things forever. Instead, we should specify and
> publish a general API for doing this! That way, if we later decide that
> we want to change how to obtain that information, we can change a shared
> library without having to force all of the application programs to
> recode their programs.
I see no problem in creating library that does readdir("/devices/cdroms/")
and hides it in nice routines you ask for? (But I think ability to ls
/devices/cdroms is _good_ idea.)
Pavel
-- I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel Hi! I'm a .signature virus! Copy me into your ~/.signature, please!- 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/