Re: devfs - why not ?

From: Stephen Frost (sfrost@ns.snowman.net)
Date: Thu Apr 13 2000 - 22:57:37 EST


On Thu, 13 Apr 2000, Johannes Erdfelt wrote:

> On Thu, Apr 13, 2000, Stephen Frost <sfrost@mail.snowman.net> wrote:
> > Heh, of course, there's the question of: can you *get* the
> > information. I have no clue if you can or not, but I'm curious, *can*
> > you get the serial number of a mouse? Does that work for any ps/2
> > mouse? Just curious. If you can't, well, it don't make no difference
> > if they're unique. :)
>
> PS/2 mice don't have that information. USB devices have the capability
> to, but all of the mice I've seen, don't have serial numbers.

        Okay, well, just kind of FYI, I don't want a USB mouse plugged in
on some random machine on my network to control the pointer on another
machine on my network. :) The same goes for ps/2, and in general
filesystems as well.
        Now, if you want data on a partition on another machine, it would
be nice to get that information. That, however, is in general a userspace
issue. Sure, the kernel can provide information that makes sense to
provide to user space about a given device, but the kernel shouldn't be
out hunting down filesystems to mount locally.
        I would have thought the kernel would provide information to
userspace about a device (physical attributes, where the filesystem is
physically), and that userspace can then figure out what it wants to do
w/ it. If it wants to use UUID, physical location, MAC address, what have
you, it can, it's userspace. The kernel shouldn't be defining these things,
the kernel should just be telling you where it is *physically*. devfs,
mostly I think, tells you where it is physically. That's fine, userspace
can then use that info to figure out what to do w/ it. Userspace can
also go figure out other things about whatever it is to determine where
to mount it, or symlink it, or change permissions, etc, etc, etc.
        My thought is simply this, the kernel shouldn't be looking up in
tables and whatnot where to mount something, that isn't its problem. It
has some useful info about a device that just showed up, it needs to pass
that info to userspace so userspace can go do something about that device
showing up.
        The interface between the kernel and userspace is where things are
getting hung-up, I think. It used to be major,minor numbers. Now we have
the option of devfs. Well, devfs is nice because it gives us a larger
address space, but at the same time it's introduced some confusion as to
what the kernel should be doing and what userspace should be handling.
        So, let's get back to figuring out how the kernel should be talking
to userspace about devices and quit w/ the grand ideas for the userspace
half, if someone finds it useful, they'll implement it. :)

                Stephen

-
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:23 EST