Hi Kay: Kay Sievers wrote: > On Tue, Jul 14, 2009 at 20:46, Marcel Holtmann wrote: > > > That looks crazy. What are you trying to solve here? > My apologies. I'll split that up into some more readable for loops. I was just trying to walk through the bus to find the appropriate usb_device to match and return. > We also don't want these weird multiline rules with on match per line, > and the use of properties merged by earlier rules. I complained too > many times about this now. > I'll switch over to one line. I had thought it was more readable as multiline. Since the rule is referring to the parent's information, I wasn't sure that this was doable without importing the properties of the parent's earlier rules. > That whole thing get pretty annoying, it does not seem to be ready to > be shipped with udev. > Please properly fix _and_ test the stuff now. > Your earlier version already broke random keyboards and hubs, because > you obviously did not test it properly. If you don't provide a sane > solution now, I'm going to remove it from udev, and you need to create > your own package. > The utility itself is stable. The previous error with the matching against hubs within docking stations was something I didn't anticipate matching up the chain, indeed my mistake. It was corrected by being more specific on things to match on, which is what I am attempting again with this second rule. Attached is an updated patch. Again, i'm having to rely on earlier rules for parent device information. If there is a better way to do this, can you please advise rather than be rash about removing this utility from udev? There shouldn't be any worry for mismatching devices this time. The new rule looks specifically for Dell Wireless Class Controllers, with a Bluetooth protocol not matching further up the chain. I broke up the for loops by relying on find_device instead. My code is quite similar to the example that is on the libusb documentation for matching a property: http://libusb.sourceforge.net/doc/examples-code.html I'm not really sure of any way to make it more readable other than adding superfluous spacing and comments as it's a very basic example. Thanks, -- Mario Limonciello *Dell | Linux Engineering* mario_limonciello@dell.com