Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jimmiller962

macrumors newbie
Original poster
Jul 3, 2008
4
0
I have been assigned a project to port an internal Windows and Linux utility to OS X. All has gone well up to this point, however, I have the requirement to locate the disk geometry for any given disk... which I am unable to locate. I expected to find an ioctl or deviceio function to grab this information, but so far nothing. I suspect I am overlooking something simple, but just can't find what I am missing.

Thoughts? Suggestions? Any help, even a nudge in the right direction would be greatly appreciated!

Thanks,
Jim

After further research I have located DIOCGDINFO, which seems like it should grab the correct info. I have located the definitions in disklabel.h, which is buried deep in System/Library/Frameworks/Kernal.framework/Versions/A/Headers/sys/disklabel.h, unfortunately I am unable to locate a form of #include that finds the file. For example, the following all fail:

#include <disklabel.h>
#include <sys/disklabel.h>, and even
#include <System/Library/Frameworks/Kernal.framework/Versions/A/Headers/sys/disklabel.h>

Of 10+ include files this is the only one that is eluding capture.

Thoughts?
 
FWIW, you've misspelled "Kernel". It contains no a's.

Code:
#include <System/Library/Frameworks/Kernal.framework/Versions/A/Headers/sys/disklabel.h>

This is a relative path, not an absolute path. It's also enclosed in <>'s which means "search system directories". Double-quotes should be used for an absolute path.

I'm not saying this will fix things, just listing the most obvious errors.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.