Re: devfs vs udev, thoughts from a devfs user

From: Greg KH
Date: Tue Feb 10 2004 - 13:40:35 EST


ugh, and here I said I wouldn't respond. But to be fair, he wrote me
this before I said that...

On Tue, Feb 10, 2004 at 09:55:49AM -0800, Mike Bell wrote:
> On Tue, Feb 10, 2004 at 09:01:57AM -0800, Greg KH wrote:
> > Did you read:
> > http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs
>
> While we're at it...
>
> > Problems:
> > 1) devfs only shows the dev entries for the devices in the system.
>
> Why is that a bad thing? Why should I want to see dev entries for firewire
> drives on my 486 or LPT1 on my legacy-free laptop?

No, I'm saying that devfs does solve this problem. Quite well in fact.

> > 2) devfs does not handle the need for dynamic major/minor numbers
>
> It does as well as udev does. You say it yourself, "if the kernel switches to
> dynamic major/minor". The same is true of devfs. It was designed for dynamic
> major/minors, and the static ones were for backward compatibility with static
> /devs.

But devfs never used the dynamic major/minor code. No one used it.
It's not even present anymore in 2.6. That shows that devfs does not
solve this problem by itself.

> > 4) devfs does provide a deamon that userspace programs can hook into
> > to listen to see what devices are being created or removed.
>
> How is that a problem?

It isn't. It's saying that devfs does do this.

> > Constraints:
> > 1) devfs forces the devfs naming policy into the kernel. If you
> > don't like this naming scheme, tough.
>
> Not true at all. If you don't like the naming scheme, run devfsd. Just
> like running udev, only unlike udev at least you have device files even
> if the daemon's not running.

Heh, you haven't ever converted a driver to use devfs have you? If so,
you would have seen the fact that you had to specify your devfs name in
the driver interface. That's hard coding the naming scheme in the
kernel.

And how flexible does devfsd allow you to specify your own naming
scheme? How can you get the info from devfsd that you need to provide a
proper device name? No one I know has ever does this. And I know some
people who tried real hard...

> > 2) devfs does not follow the LSB device naming standard.
>
> No, but the userspace daemon attached to it could do so, just like udev.

But it doesn't. That was the point.

udev defaults to this. Which is the sane thing to do.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/