Re: UUIDs (and devfs and major/minor numbers)

Pavel Machek (pavel@bug.ucw.cz)
Sat, 19 Jun 1999 14:07:07 +0200


Hi!
>
> I do agree with you having having a unique string-based,
> self-descriptive device ID is a good thing, but instead of using that ID
> *instead* of the major/minor devices, why not have the kernel export a
> mapping table between the string ID and the major/minor devices to the
> user mode daemon, and then letting the user mode deamon crate the
> appropriate device files if necessary? This solves the NFS backwards
> compatibility problem, for example.

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/