On Mon, Dec 15, 2008 at 09:16:38PM -0500, Penguin Lover Willie Wong squawked:
>  I have had this line in my /etc/udev/rules.d/10-local.rules for a
>  couple years now
> 
>   <snip>
> BUS=="usb", KERNEL=="sd?[0-9]", SYSFS{serial}=="DEF10BDD77EE", NAME="%k", 
> SYMLINK+="BackUpDrive"
>   </snip>
> 
>   <snip>
>   looking at device '/bus/usb/devices/1-4:1.0/host24/target24:0:0/24:0:0:0':
>     KERNEL=="24:0:0:0"
>     SUBSYSTEM==""
>     DRIVER=="sd"
...

>   looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb1/1-4':
>     KERNELS=="1-4"
>     SUBSYSTEMS==""
>     DRIVERS=="usb"
>     ATTRS{configuration}==""
>     ATTRS{serial}=="DEF10BDD77EE"
>    </snip>
> 

Okay, I think I have a bit more idea. It turns out that for some
reason the usb device is not listed as a parent device of the block
device sda1. This is what happens:


  <snip>
sep 24:0:0:0 # udevinfo -p /sys/bus/usb/devices/1-4\:1.0/host25/target25\:0\:0/2
5\:0\:0\:0/block\:sda/sda1/ -a

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device 
'/bus/usb/devices/1-4:1.0/host25/target25:0:0/25:0:0:0/block:sda/sda1':
    KERNEL=="sda1"
    SUBSYSTEM==""
    DRIVER==""
    ATTR{stat}=="   30973   192214    28182   225432"
    ATTR{size}=="625137282"
    ATTR{start}=="63"
  </snip>

That's the end of the output. If I execute udevinfo against 
  ...target25:0:0/25:0:0:0 
then all the parent devices are printed. Is there any way of making
udev recognize that the sda1 device is a child of the actual hardware?

Thanks, 

Willie

-- 
Ferrets live by a code tried and true
>From which humans can benefit, too.
Teach your sons and daughters
To do unto otters,
As otters would do unto you.
Sortir en Pantoufles: up 739 days,  1:16

Reply via email to