* Re: devfs gone, and now?
2004-06-26 6:41 devfs gone, and now? Jan Engelhardt
@ 2004-06-26 13:26 ` Kevin P. Fleming
2004-06-26 13:48 ` Olivier Mehani
1 sibling, 0 replies; 3+ messages in thread
From: Kevin P. Fleming @ 2004-06-26 13:26 UTC (permalink / raw)
To: linux-hotplug
Jan Engelhardt wrote:
> devfs is tagged obsolete and I'm worrying about what modules will now do,
> because with devfs they could create a node in /dev whenever they were loaded,
> and remove that, if unloaded. That's now missing, or is there an udev solution?
Yes, read the udev documentation.
> As I currently see it, udev creates a "static" device node in /dev which
> persists even across reboots, so if you load a lot of modules which create a
> lot of block/char/etc. devices in /dev, they would probably be removed upon
> 'rmmod', but not if you just reboot.
No, read the udev documentation. Everything you've described here works
perfectly with udev.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: devfs gone, and now?
2004-06-26 6:41 devfs gone, and now? Jan Engelhardt
2004-06-26 13:26 ` Kevin P. Fleming
@ 2004-06-26 13:48 ` Olivier Mehani
1 sibling, 0 replies; 3+ messages in thread
From: Olivier Mehani @ 2004-06-26 13:48 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]
On Sat, 26 Jun 2004 08:41:10 +0200 (MEST)
Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
> devfs is tagged obsolete and I'm worrying about what modules will now
> do, because with devfs they could create a node in /dev whenever they
> were loaded, and remove that, if unloaded. That's now missing, or is
> there an udev solution?
udev is there to replace, in userland, the behavior devfs had in
kernelspace
> As I currently see it, udev creates a "static" device node in /dev
> which persists even across reboots, so if you load a lot of modules
> which create a lot of block/char/etc. devices in /dev, they would
> probably be removed upon'rmmod', but not if you just reboot.
in fact, it creates a static node, but in a tmpfs /dev (if you use the
udevstart script), which does _not_ persist across reboots
the mechanism now (please correct me if this is not totally true) is :
1. a device is plugged in or discovered, the kernel generates an event
2. hotplug handles this event and loads the appropriate driver
3. the driver tells the kernel something like "i manage a device called
/dev/foo"
4. hotplug then calls udev with this information
5. udev applies the different rules to create the needed device nodes
and calls every user supplied script to execute any type of operation
after the node has been created (like mounting a filesystem,...)
when a device is removed, another event is generated, the process is
globally the same, but ends up with udev removing the (now useless)
nodes, so everything is okay
of course, udev will only remove nodes it created, so if you start with
your old /dev, nothing new will happen, but, once the udevstart script
has been executed, you'll get something much like devfs regarding the
number of present nodes
note: it may however be interesting to have a static /dev on your root
filesystem, just in case something went wrong and you had to boot your
system without starting udev
--
Olivier Mehani <shtrom@ssji.net>
PGP fingerprint = 3720 A1F7 1367 9FA3 C654 6DFB 6845 4071 E346 2FD1
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread