Suppose I have two Kindles of the same model (but differing serial numbers, natch). I wish to open the particular Kindle that has a given serial number. The Kindles have been connected to the host in an arbitrary order. How do I open the right Kindle?
Looking at /dev/ugen* (or /dev/usb/*), I can march through them and use
So I'd like to figure out which /dev/d* corresponds to that file in /dev/usb/*. How do I do this?
One way might be to modify /etc/devd.conf so that I run a program (let's call it
As a final desperate move, I can have
Obviously I can't rely on /dev/msdosfs/Kindle, because who knows which Kindle that points to?
Is there a straightforward way to map from /dev/usb/* to /dev/d*?
Looking at /dev/ugen* (or /dev/usb/*), I can march through them and use
usbconfig
to find the serial number. But I can't then mount that; I get the message
Code:
Block device required
One way might be to modify /etc/devd.conf so that I run a program (let's call it
fred
) every time a USB device is connected or disconnected. The idea would be, on connection, to look at /dev/d* to see what's been added, and then add a symbolic link somewhere under /dev/ which points from the serial number to that device. The problem is that when fred
is run upon connection, the new device /dev/d* hasn't been added yet. Grr.As a final desperate move, I can have
fred
run barney
in the background and exit; barney
would wait a second, look for a modified /dev/d*, and then generate the appropriate symbolic link. But I'd rather not do that.Obviously I can't rely on /dev/msdosfs/Kindle, because who knows which Kindle that points to?
Is there a straightforward way to map from /dev/usb/* to /dev/d*?