On Wed, Jun 25, 2008 at 3:58 AM, A C Hurst <A.Hurst@sheffield.ac.uk> wrote:
> If you have strong OS mojo and can help with the "how can I find all
> attached USB mounted devices" for any OS, please contact me.

I'm sure there are people better qualified than me, but I'd go for reading /etc/mtab and looking for
"/dev/sd*" entries.

getmntent(3) is an approach I've considered for Linux.  It's not a great approach; you can't readily pull out the USB ID to be sure you're talking to the right device, you have to rely on devices "looking like" a Garmin in storage mode.   That's not terrible, but it  means you might do things like spin up idled drives.
That's the hack way to do it, see
for the proper way!

Actually, no.   That document covers the development of kernel drivers, not finding where a device is mounted.