On Sat, Feb 7, 2009 at 05:10, Dan Nicholson <dbn.lists@xxxxxxxxx> wrote: > On Fri, Feb 6, 2009 at 4:40 AM, Leandro Dorileo <ldorileo@xxxxxxxxx> wrote: >> Few days ago I wanted to understand a bit better udev, and started >> reading its source code, and went to TODO file to see how I could >> start contributing, and picket the line: "convert firmware.sh to C ". >> In that regard I have some questions: >> >> 1 - there isn`t any a udev rule using firmware.sh in upstream source >> code(I may have forgot something but a grep -r 'firmware.sh' in >> rules.d didn`t show me any thing), do distributors set one? I also >> couldn`t find one in fedora 10. > > There's a rule in extras/firmware/50-firmware.rules that gets > installed along with firmware.sh. > >> 2 - who does set $DEVPATH, $FIRMWARE variables used in firmware.sh? > > The kernel sets them as part of the uevent, I believe. DEVPATH is always defined in every uevent and set by the kernel, FIRMWARE is set by the kernel's "firmware" class and carries the requested name, which the in-kernel driver has supplied to the request_firmware() call. >> 3 - why would be good "convert firmware.sh to C"? in TODO file this >> line is followed by a "(?)" which makes me think it`s not well >> discussed yet. ;) Sure, a reasonable implementation would be fine. Especially as we call 'sed' now to collect failing requests. It can just link to libudev's code to encode the filename. > Speed? I don't know. It doesn't look like it does much beyond writing > the firmware into a data entry in sysfs. It does not really matter, but we got rid of most shell uses recently, so it might be nice to convert that too. Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html