From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sat, 29 Dec 2001 18:50:23 +0000 Subject: Re: Is there a bug in hotplug.functions w/ ${TYPE}.usermap? Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Stamatis Mitrofanis wrote: > load_modules is ugly because: > - code is not very unreadable (at least one error went unnoticed) "not very unreadable" = double negative = readable ;) Code generally has bugs, they turn up over time. This one was pretty easily fixed once it turned up. > - it has many story-telling FIXMEs in it for very long (so, it may have > a bad architecture) FIXME requests that hang out are a sign that people haven't really hit the problem being identified. In this case it's a sign that not many people are using C helper programs to find out what drivers to use ... parsing in BASH seems to work better than some folk thought it would. > It's the agent's job to map requests to drivers and modutil's job to > load kernel modules. Using a load_driver function between these two is > bad because it complicates things. Not all drivers are kernel modules, and load_driver understands that. It also invokes the driver setup scripts. > Why is the requirement for either *modules or the function *_map_modules > from load_driver when the mapping can be done by the agent (possibly by > calling its helper program)? Uh, the agent _is_ doing the mapping, possibly by calling its helper program. It just delegates all the common logic to a helper function, so when there's a bug in the common logic it gets fixed once not N times. - Dave _______________________________________________ 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