Re: devfs - why not ?

From: Johannes Erdfelt (jerdfelt@sventech.com)
Date: Thu Apr 13 2000 - 16:49:14 EST


On Thu, Apr 13, 2000, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > I want mouse A to always be named mouse0, and mouse B to always be named
> > mouse1, EVEN if I connect mouse B in first. It should be named mouse1
> > and mouse0 should be empty.
>
> If your mice dont have serial numbers you are screwed. You can get reasonably
> nice behaviour by aggregation and the way Linus eventually settiled the
> issue. Its annoying you cant as several people want to put 4 keyboards,
> 4 mice, 4 video cards on a Linux PC.

You aren't screwed necessarily. You can save the current topology of the
USB bus to find out which mouse is which. It's not perfect since things
will change if you move the mouse, but it's better than having the
device being randomly assigned.

Some sort of defined behaviour is better than random IMHO.

> The UUID problem solves problems bigger than local devices. I should be able
> to mount by uuid and it find the volume be it mounted locally, remotely,
> in a cd-changer. My Amiga500 could do most of this.

Yes, I do agree with you there.

> > For instance, the UUID solution doesn't solve the problem for
> > filesystems which may not have UUID's, you've basically only solved it
> > for ext2. Like Linus always says, "Think big".
>
> Name an fs that doesnt have a signature of some sort, and isnt itself just
> a network fs.

FAT filesystems aren't guaranteed to be unique. I remember a formatter
would use the same number everytime. Makes it difficult to
differentiate.

However, you're still thinking small here. "Think big".

UUID is definately a useful tool for identifying a device, but in the
larger scheme of things, it's useful for only a small subset of devices
and right now, it's only useful if the userspace tool specifically looks
for it.

I don't expect a mouse driver to know about all the different possible
kinds of busses and mices to be able to extract enough information to
make a reasonable decision on which mouse it is.

I'd like some sort of userspace assisted persistant naming of devices.
UUID's could be part of the information used. USB Serial Numbers could
be used. Bus topology could be used.

Obviously some pieces of information are more useful than others (Serial
Numbers and UUID's are the best since they are guaranteed unique no
matter where it moves).

JE

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



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:22 EST