Re: devfs vs udev, thoughts from a devfs user

From: Theodore Ts'o
Date: Wed Feb 11 2004 - 15:07:48 EST


On Wed, Feb 11, 2004 at 10:44:10AM +0100, Helge Hafting wrote:
> Sure. Completely random device numbers will make this demand loading of
> device drivers impossible. Either it won't happen (all numbers won't be
> completely random, although they may get more dynamic than today) or
> module loading based on device node opening will be deprecated.

It could be made to work. You could have a magic device number, say
(255,255), which means "unloaded device driver", which causes a
hotplug callout, and a SIGSTOP sent to the process that tried the
open. The userspace program would then be responsible for loading the
relevant device driver, converting the /dev file to the correct
dynamic major/minor number, and then sending a SIGCONT to the process,
which would then either restart the open() or the open() would return
-EAGAIN.

It would be kinda hairy, in that the kernel would need to know whether
or not userspace had accepted responsibility for handling these calls
(if it didn't open() would just return -ENODEV as it does today). So
it might not be worth doing, but if people really cared about it, it
could indeed be done.

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