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?
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?