Hello, I have a question about detecting/mounting USB mass storage
devices..

I have an embedded system here with uCLinux 2.4.22 and I'd like to
detect when a USB device is plugged in (specifically a mass storage
device) and mount it. Is there a way to either poll or have a callback
occur when one is plugged in that my user-space app can detect?

I'm hoping there's an ioctl call or something I can do, but I don't see
anything obvious in the usb drivers. I'll keep looking, but maybe
someone can point me in the right direction.

here is the block device I mount when I plug in a device:
/dev/scsi/host0/bus0/target0/lun0/part1

if I plug in a different flash drive it changes to
/dev/scsi/host1/bus0/target0/lun0/part1

It looks like I can maybe poll:
/proc/scsi/usb-storage-0/0
and
/proc/scsi/usb-storage-1/1
...
for the "Attached: Yes" parameter??

Is there an accepted way to do what I'm trying to do?
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to