Looks like I'll give up on the serial number being usefull. As mentioned in another recent post I now treat devices generically.
I would like a simple way to take the DEVICE reported to /etc/hotplug/usb/usb-storage (eg /proc/bus/usb/003/038) and figure out which scsi device it maps to. The /proc/scsi/usb-storage-n/m only details the GUID. The GUID depends on the serialnumber, so that's no good. Couldn't the two be linked by something definitly unique, perhaps the 003/038 could appear in /proc/scsi/usb-storage-n/m; or maybe there could be counter; or a timestamp. At the moment, because I can't be sure which device is the one the user just plugged in, I have to resort to mounting all attached devices on the bus - which may include one I've just umounted but not unplugged. On Tue, 08 Oct 2002 08:24, Matthew Dharm wrote: > On Mon, Oct 07, 2002 at 11:26:35AM -0700, Randy.Dunlap wrote: > > On Mon, 7 Oct 2002, Matthew Dharm wrote: > > | On Tue, Oct 08, 2002 at 01:11:01AM +1300, Michael Hamilton wrote: > > | > 1. What part of the serial remains constant for the same device, > > | > if any? > > | > > | The whole thing should. The compliance test that the USB-IF (including > > | myself) are working on requires a constant serial number. > > > > Matt, do you read that as part of any spec (requirement)? > > Not exactly. But the entire Mass Storage DWG was pretty supprised when I > pointed out devices that had this broken behavior. > > The spec requires a 'unique' serial number, but does not specify what the > domain for that uniqueness is. The intent was to be unique over all > devices with that VID:PID. A few (a _very_ few) manufacturers chose to > interpret this as unique for a given USB bus. > > The changing serial number is because the bus address is incorporated into > the serial number. > > Of course, that means that it's possible to have two units on two different > USB busses with the same bus address, and thus the same serial number. > > Matt ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
