From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 24 Feb 2005 12:26:46 +0000 Subject: Re: The Next Generation Message-Id: <1109248006.6894.66.camel@localhost.localdomain> List-Id: References: <20050217190941.GA1561@vrfy.org> In-Reply-To: <20050217190941.GA1561@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Thu, 2005-02-24 at 14:29 +0300, Roman Kagan wrote: >On Thu, Feb 17, 2005 at 08:09:41PM +0100, Kay Sievers wrote: >> I propose to make the udev architecture _the_ generic hotplug handler. >> We use the same rules which we are using today to compose a name for a >> specific device. We just need something like a POSTPROCESS="/sbin/some-program" >> key for our rules which adds a program to a list of programs to be executed >> after the device node is created. >> udev needs a bit of tweaking to handle physical devices, but it applies the same >> logic as we currently use for device naming. > >After initial indigestion, I get to like this approach. Indeed, >allowing the hotplug multiplexer to apply sophisticated policies is a >good thing, and the current udev way of handling policies seems to cover >everything one may need. > >I'd like to point out two issues in this regard: > >1) NAME and SYMLINK rules become just a special case of rules, and > should be treated as such. This means that the namedev functionality > should be logically isolated from the multiplexer functionality, > probably not into a separate program, but at least it should be > possible to compile out at build time and switch off at runtime. > (This seems to have been mostly addressed in your patch) Most of the new systems out there will never work without udev again, but sure, we can have an option to skip node creation/removal. :) As Marco already pointed out, it seems a bit confusing to stop the rule processing if a NAME key is found, so no later HOTPLUG, SYMLINK key is added to the list. We may change that, but let the first NAME key still set the value? And we may introduce an additional OPTION to make a rule final? >2) the multiplexer shouldn't touch sysfs unless explicitly or implicitly > requested to. E.g. some of the keys in udev can be deduced from the > environment variables passed to hotplug by the kernel. The problem with the hotplug environment variables is backwards compatibility. If we require a specific kernel version at some time, we may do that - if it really helps. And with the new libsysfs no attribute which is not explicitly requested, will be openend. > (BTW a generic ENV{variable} key would be useful too.) Yes, this will be nice, if we handle /sys/devices with rules. > OTOH if a hotplug script wants to make sure a particular sysfs > attribute is available when it runs, it would add > SYSFS{attribute}="*" to its rule, so that the multiplexer does > wait_for_sysfs() for it. Nice idea. We may implement the whole wait_for_sysfs logic as a set of rules. I like that. Thanks, Kay ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&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