How to associate lsusb bus/device with /dev entry?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all. Could someone tell me how to associate a USB Bus:Device info with a /dev/entry?

Below I have copy/pasted lsusb and /sys/block entries for two drives plugged into the same USB bus.

When there was only one USB key, I could simply take the Bus number (with leading 0's trimmed off) and

   ls -alh /sys/block | grep /usbB/  # B is the bus number

That heuristic fails when there is more than one drive on the same bus. The "lsusb" Device number has no discernible match in the corresponding /sys/block path

Can anyone give me a hint in the right direction?

---

lsusb:

Bus 003 Device 013: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick

Bus 003 Device 015: ID 0781:5406 SanDisk Corp. Cruzer Micro U3


/sys/block:

sdc -> /sys/devices/pci0000:00/0000:00:16.2/usb3/3-3/3-3:1.0/host16/target16:0:0/16:0:0:0/block/sdc

sdd -> /sys/devices/pci0000:00/0000:00:16.2/usb3/3-4/3-4:1.0/host18/target18:0:0/18:0:0:0/block/sdd

---

Thanks.


Mat

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux