Hi Fixed thanks.
Gena Amateur Call: M 0 E B P VOIP / IM: gena1959uk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Nicholson Sent: Wednesday, August 29, 2007 10:28 PM To: [EMAIL PROTECTED]; BLFS Support List Subject: Re: Udev matters On 8/29/07, Georgina Joyce <[EMAIL PROTECTED]> wrote: > > In attempting to get a braille display working with brltty, the brltty list > invited me to show the contents of /dev/bus/usb/, from which, it raised an > interesting question. That of leading zeroes, it would appear that brltty > expects the devices to have a leading zero but my lfs installation doesn't, > should it? I believe that if they're using libusb, it should take care of it. But I'm not certain, and it's not really worth it for you to tell the brltty people how to write their application. Instead we can just fix up your udev rule to use printf and give the leading zeroes, which is what's used on other distros. Look at /etc/udev/rules.d/25-lfs.rules for this rule: SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev}; B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", NAME="%c" Comment it out (# is for comments) and try this rule that other distros were using: SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c" The key here is the %03i format specifier for printf which will give the leading zeroes to fill to three places. This is the first time I've known this to be an issue (the leading zeroes). The good news is that this hackery is not needed on 2.6.22 or newer kernels. For those, the name is in the environment, which allows this rule: SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" which is in the udev-config rules with LFS-6.3. If you're not using a newer kernel, though, the rule with printf will work, though. (Unless your shell doesn't provide printf and /usr is on a separate mount) -- Dan -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page __________ NOD32 2490 (20070829) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
