Re: usb-mass-storage and /dev/sdXX assignation

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

 



On Wed, Jul 23, 2003 at 10:31:01AM +0200, dballester@kernpharma.com wrote:
> Hi:
>       I'm searching a user-way to be able to know what /dev/sdXX has been
> assigned to any usb-mass-storage. In google all info is related in how to
> mount automatically the scsi partition, but always are static. I trying to
> do it dinamically 'cause today one usb-mass-storage can be assigned to
> /dev/sda1 but tomorrow colud be /dev/sdb1. I'm searching under /proc/scsi,
> /proc/partitions, /proc/bus/usb but all of them have no info ( to my eyes )
> to make a join between the device and the scsi partition assigned.

Look at the sysfs entry for the usb-storage device.  It will show the
topology of the tree, and point to the proper device.  Oh, and you can
scan the list of block devices in /sys/block to see which one points to
your usb-storage device.

thanks,

greg k-h
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux