Determining HD drive for Volumes

Determining HD drive for Volumes

Post by Andrea Goz » Thu, 04 Sep 2003 22:33:46

Question regarding OSX:
Is there a way to determine the physical HD drive on which a volume resides?
I'm using FSGetVolumeInfo, but the driveNumber field of the returned
FSVolumeInfo always reports value 1 for all the volumes i try for (hd,
network, etc). I also always get value 0 for the driverRefNum.
And yes, the FSVolumeInfoBitmap for the FSVOlumeInfo call is correctly

Any idea of what's wrong?
Other methods?

Thank you

Determining HD drive for Volumes

Post by Miro Juris » Thu, 04 Sep 2003 23:39:35

In article <bj4qk6$edbhj$ XXXX@XXXXX.COM >,

I am sure there is, but I am not sure if Carbon calls will let you do that. You
probably have to drop down to the BSD level. For example, statfs() looks like it
does some, but not all of what you want, and the df command gives you the
information that you want, but I don't know how it works. It source should be in
Darwin, though.



If this message helped you, consider buying an item
from my wish list: < ;