Re: FSGetVolumeMountInfoSize returns error -36?
Re: FSGetVolumeMountInfoSize returns error -36?
- Subject: Re: FSGetVolumeMountInfoSize returns error -36?
- From: James Bucanek <email@hidden>
- Date: Wed, 18 Aug 2010 15:33:06 -0700
James Bucanek <mailto:email@hidden> wrote (Tuesday,
August 17, 2010 11:04 AM -0700):
Poking around the I/O Registry, I think my best bet is walk up the tree and
find the highest IOMedia node. There appears to be one parent IOMedia node for
each partition of volumes, whether that's on a single hard disk or a RAID;
this is exactly what I'm looking for.
For anyone stumbling across this thread in the future, it's
actually even simpler than I imagined. All you have to do is
walk up the I/O Registry nodes (for which there's a convenient
iterator) and look for the IOMedia node that has a 'Whole'
property set to 'true'. The Whole=true property indicates a
media object that represents a "whole" storage device, such as a
hard disk, RAID, USB drive, CD/DVD, or disk image.
All of this is clearly demonstrated in the VolumeToBSDNode
example. :)
For my application, I then extract the kIOBSDNameKey property
which gives me a unique identifier for that device. I the volume
has no I/O Registry node, or there's no "Whole" IOMedia node to
be found, (which will be true in the case of network volumes) I
fall back to using the filesystem number as my identifier. What
you use in the non-device case will depend on your application.
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden