Starman
2005-03-06 15:45:06 UTC
Hi all,
I've been trying to marry these two pieces of code I have with no
luck. First piece of code gets a list of all USB devices that have a
specific vendor and product. That works fine. The other piece of code
walks the list of mounted devices and gives me the name of the /dev
path they're on. The problem is that I can't seem to figure out how to
ask what /dev path the specific device is mounted on.
eg: FUJIFilm USB device is on /dev/disk2s2.
I can get a service ID for the USB device, and I can get a service ID
for the mount point, but the two service IDs don't seem to play well
together since they're different types.
Using ioreg from the command line, I see the devices, but that doesn't
even tell me what the mount points are.
Using IORegistryExplorer also tells me lots of information about the
device, but no mount points.
However, using System Profile, I DO get the information I need.
FUJIFilm
...
BSD Name: disk2
So there HAS to be a way to do it, I just don't see how. Also, the
"disk2" that System Profiler gives me doesn't match with the "disk2s2"
that I get from the other code I have.
Any help? Thanks.
Mike
I've been trying to marry these two pieces of code I have with no
luck. First piece of code gets a list of all USB devices that have a
specific vendor and product. That works fine. The other piece of code
walks the list of mounted devices and gives me the name of the /dev
path they're on. The problem is that I can't seem to figure out how to
ask what /dev path the specific device is mounted on.
eg: FUJIFilm USB device is on /dev/disk2s2.
I can get a service ID for the USB device, and I can get a service ID
for the mount point, but the two service IDs don't seem to play well
together since they're different types.
Using ioreg from the command line, I see the devices, but that doesn't
even tell me what the mount points are.
Using IORegistryExplorer also tells me lots of information about the
device, but no mount points.
However, using System Profile, I DO get the information I need.
FUJIFilm
...
BSD Name: disk2
So there HAS to be a way to do it, I just don't see how. Also, the
"disk2" that System Profiler gives me doesn't match with the "disk2s2"
that I get from the other code I have.
Any help? Thanks.
Mike