From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 22 Jun 2005 02:27:17 +0000 Subject: biggger changes in the next udev version Message-Id: <20050622022717.GA32399@vrfy.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org We merged now the recent changes for udev to the upstream repository: http://kernel.org/git/gitweb.cgi?p=linux/hotplug/udev.git;a=summary It is a sync-up with the features of the currently shipped SUSE version along with some new features. The goal is to take over the complete kernel event processing and provide an efficient way to dispatch kernel events. Replacing the current shell script logic and the kernel forked helper with a netlink-daemon and a rule based event handling: o udevd listens to netlink events now. The first valid netlink event will make udevd ignore any message from udevsend that contains a SEQNUM, to avoid duplicate events. SUSE disables the forked events: echo "" > /proc/sys/kernel/hotplug completely and uses only netlink to receive kernel events. For full support, it needs a patch for the broken input subsytem, that unfortunately still bypasses the driver core. o /etc/dev.d/ + /etc/hotplug.d/ directory multiplexing is completely removed from udev itself and must be emulated by calling small helper binaries provided in the extras folder: make EXTRAS=extras/run_directory/ will build udev_run_devd and udev_run_hotplugd, which can be called from a rule if needed: RUN+="/sbin/udev_run_hotplugd" The recommended way to handle this is to convert all the calls from the directories to explicit udev rules and get completely rid of the multiplexing. (To catch a ttyUSB event, you now no longer need to fork and exit 300 tty instances you are not interested in, it is just one rule that matches exactly that device.) o udev handles now _all_ events not just events for class and block devices, this way it is possible to control the complete event behavior with udev rules. Especially useful for rules like: ACTION="add", DEVPATH="/devices/*", MODALIAS="*", RUN+="/sbin/modprobe $modalias" o As used in the modalias rule, udev supports now textual substitution placeholder along with the usual format chars. This needs to be documented some day, for now it's only here: http://kernel.org/git/gitweb.cgi?p=linux/hotplug/udev.git;a=blob;f=udev_rules.c#l226 o The rule keys support now more operations. This is documented in the man page. It is possible now to add values to list-keys like the SYMLINK and RUN list with KEY+="value", to clear the list by assigning KEY="". Also "final"-assignments are supported by using KEY:="value", which will prevent changing the key by any later rule. o kernel 2.6.12 has the "detached_state" attribute removed from sysfs, which was used to recognize sysfs population. We switched that to wait for the "bus" link, which is only available in kernels after 2.6.11. Running this udev version on older kernels may cause a delay for some events and is not recommended. o A few binaries are added to the repository, which can be used to replay kernel events from initramfs instead of using coldplug. udevd can be instructed now to queue only events while the stored events from initramfs are filled into the udevd-queue. There is no documentation now besides the code itself. The additional binaries get compiled, but are not installed by default. Any testing, feedback and help is appreciated. Thanks, Kay ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ 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