Re: udev woes



In article <slrnevleuk.tuu.aznomad.2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
AZ Nomad <aznomad.2@xxxxxxxxxxxxxxxxxxx> wrote:
On Fri, 16 Mar 2007 01:08:01 GMT, Hactar <ebenZEROONE@xxxxxxxxxxx> wrote:

The rules are:

SYSFS{model}=="USB FDD", SYMLINK+=usb-floppy
ID=="target15:0:0", SYMLINK+=usb-floppyIDt
ID=="host15", SYMLINK+=usb-floppyIDh
ID=="1-1:1.0", SYMLINK+=usb-floppyID1
ID=="1-1", SYMLINK+=usb-floppyID1short
ID=="usb1", SYMLINK+=usb-floppyIDu
ID=="0000:00:09.0", SYMLINK+=usb-floppyID0
ID=="pci0000:00", SYMLINK+=usb-floppyIDp

Those are all (except the first) based on physical locations. You can't
count on the same usb-port being used.

Fair enough.

Use udevinfo to get the udev device path and then get the device attributes:
udevinfo -q path -n /dev/fda
udevinfo -a -p $(udevinfo -q path -n /dev/fda)

I assume you mean the USB FDD.

eben@pc:~$ udevinfo -q path -n /dev/sde
/block/sde
eben@pc:~$ udevinfo -a -p $(udevinfo -q path -n /dev/sde) | less -N
....
60 looking at the device chain at '/sys/devices/pci0000:00/0000:00:09.0/u
....
76 SYSFS{idProduct}=="6901"
77 SYSFS{idVendor}=="03ee"
78 SYSFS{manufacturer}=="MITSUMI "
79 SYSFS{maxchild}=="0"
80 SYSFS{product}=="MITSUMI USB FDD "
81 SYSFS{speed}=="12"
82 SYSFS{version}==" 1.10"
....

Go off attributes like the vendor id or serial number.

OK, I added the rule

SYSFS{idVendor}=="03ee", SYSFS{idProduct}=="6901", SYMLINK+=usb-floppyIDvp

Same behavior. Restarted udev... same behavior.

Umm... what now?

--
-eben QebWenE01R@xxxxxxxxxxxxxxxxx http://royalty.mine.nu:81

Every normal man must be tempted at times to spit upon his hands,
hoist the black flag, and begin slitting throats. -- H.L. Mencken
.