From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Kagan Date: Thu, 24 Feb 2005 11:29:13 +0000 Subject: Re: The Next Generation Message-Id: <20050224112913.GE2361@katya> 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, 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) 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. (BTW a generic ENV{variable} key would be useful too.) This would probably save quite a lot of open()/read()/close() calls, and would allow many rules not to wait_for_sysfs() at all. 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. Cheers, Roman. ------------------------------------------------------- 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