[root@localhost liuqi]# udevinfo -a -p /sys/class/block/sda/
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 '/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda': KERNEL=="sda" SUBSYSTEM=="block" DRIVER=="" ATTR{range}=="16" ATTR{removable}=="0" ATTR{ro}=="0" ATTR{size}=="312581808" ATTR{capability}=="12" ATTR{stat}==" 34431 25182 1206496 804770 36871 125422 1300360 15148153 0 325943 15956695"
looking at parent device '/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block': KERNELS=="block" SUBSYSTEMS=="" DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0': KERNELS=="0:0:0:0" SUBSYSTEMS=="scsi" DRIVERS=="sd" ATTRS{device_blocked}=="0" ATTRS{type}=="0" ATTRS{scsi_level}=="6" ATTRS{vendor}=="ATA " ATTRS{model}=="HITACHI HTS54321" ATTRS{rev}=="FB2Z" ATTRS{state}=="running" ATTRS{timeout}=="60" ATTRS{iocounterbits}=="32" ATTRS{iorequest_cnt}=="0x11696" ATTRS{iodone_cnt}=="0x11696" ATTRS{ioerr_cnt}=="0x0" ATTRS{modalias}=="scsi:t-0x00" ATTRS{evt_media_change}=="0" ATTRS{queue_depth}=="1" ATTRS{queue_type}=="none"
looking at parent device '/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0': KERNELS=="target0:0:0" SUBSYSTEMS=="scsi" DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1f.2/host0': KERNELS=="host0" SUBSYSTEMS=="scsi" DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1f.2': KERNELS=="0000:00:1f.2" SUBSYSTEMS=="pci" DRIVERS=="ata_piix" ATTRS{vendor}=="0x8086" ATTRS{device}=="0x2928" ATTRS{subsystem_vendor}=="0x17aa" ATTRS{subsystem_device}=="0x20f7" ATTRS{class}=="0x01018a" ATTRS{irq}=="16" ATTRS{local_cpus}=="ffffffff" ATTRS{local_cpulist}=="0-31" ATTRS{modalias}=="pci:v00008086d00002928sv000017AAsd000020F7bc01sc01i8a" ATTRS{enable}=="1" ATTRS{broken_parity_status}=="0" ATTRS{msi_bus}==""
looking at parent device '/devices/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS==""
[root@localhost liuqi]#
|