From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 10 Aug 2005 14:47:21 +0000 Subject: Re: [PATCH] add USB coldplay support into udevstart Message-Id: <20050810144721.GA32169@vrfy.org> 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 On Wed, Aug 10, 2005 at 01:00:52PM +0200, Olivier Blin wrote: > Olaf Hering writes: > > > On Mon, Aug 08, Kay Sievers wrote: > > > >> I don't think, that we want to do this in udevstart, at least at it's > >> current state. It will break to many setups, cause all the distros have > >> their own way to handle the coldplug case. > > > > Please rename 'udevstart' to 'udev_fill_dev_dir_with_device_node_entries', > > to reflect what the real purpose is (or was, back in the old days). > > I understand the initial goal of udevstart is to populate /dev, but it > can be extended to replay other events that would have been missed > before udev was started. > > Maybe we could add a --coldplug= option with a comma-separated list of > buses. Thus it will be backward compatible for distros already > handling the coldplug case, and it will allow to easily switch to > udevstart for coldplug. Should I write the patch? Sure, that would be nice. But start it as it's own program. Maybe copy udevstart for it, but leave it as it is for now. I don't want to touch it with experimental stuff, also not with alternate code paths, it is the most critical part of udev for most of its users. There are many options to try and I don't think that serializing the complete coldplug with a single process makes a lot of sense. It would execute all udev rules for every device it finds, external stuff is called that may take a unpredictable amount of time to run. This must be some async operation, similar to what we do with udevd, I think. > By the way, it would probably be cleaner to use udev_process_event() > in add_device() (from udevstart), unless there is some special case I > miss. We don't want the wait_for_sysfs crap with udevstart, it is much faster that way. It may change with a future udev version, which dependend on a specific kernel version, that does not need most of the wait_for_sysfs anymore. > And this piece of code: > if (strcmp(dent->d_name, "net") = 0) > device_list_insert(dirname2, "net", &device_list); > else if (has_devt(dirname2)) > device_list_insert(dirname2, dent->d_name, &device_list); > can be simplified as: > if (strcmp(dent->d_name, "net") = 0 || has_devt(dirname2)) > device_list_insert(dirname2, dent->d_name, &device_list); Yeah, that's right. Thanks, Kay ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ 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