• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FSGetVolumeMountInfoSize returns error -36?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: FSGetVolumeMountInfoSize returns error -36?
      • From: Chris Suter <email@hidden>
References: 
 >Re: FSGetVolumeMountInfoSize returns error -36? (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: FSGetVolumeMountInfoSize returns error -36?
  • Next by Date: Re: FSGetVolumeMountInfoSize returns error -36?
  • Previous by thread: Re: FSGetVolumeMountInfoSize returns error -36?
  • Next by thread: Re: FSGetVolumeMountInfoSize returns error -36?
  • Index(es):
    • Date
    • Thread