Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding the offset of a partition



At 12:35 -0800  on  2/3/06, Jason Bobier wrote:
Hey Dan,

This is what I'm going to for our HFS+ support, but on MBR disks I need to match the entire disk to handle the windows compatibility.

Walking up the device segments getting the base of each with DKIOCGETBASE seems like it will work.

I don't think it will. Most of Apple's partition schemes (all?) hide free space by not creating IOMedia objects for them. I don't think your method will be able to account for this. You could catch it by comparing a calculated sum of all the IOMedia object with the size of the whole disk, but I that won't help you get around the problem.

And yes, free space between partitions is pretty common in the wild. I seem to recall that DiskUtility did it for awhile (and may still) but I could be wrong about that. The point is that nothing in the way a PartitionScheme driver works requires that it expose the entire drive, nor that the exposed sections be contiguous, or in any particular order.
--
______________________________________________________
Arguing with an engineer is like wrestling with a pig in mud.
After a while, you realize the pig is enjoying it.
______________________________________________________
Kevin Elliott <mailto:email@hidden>
AIM/iChatAV: email@hidden (video chat available)
______________________________________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden


This email sent to email@hidden
References: 
 >finding the offset of a partition (From: Jason Bobier <email@hidden>)
 >Re: finding the offset of a partition (From: "Justin C. Walker" <email@hidden>)
 >Re: finding the offset of a partition (From: Jason Bobier <email@hidden>)
 >Re: finding the offset of a partition (From: Dan Markarian <email@hidden>)
 >Re: finding the offset of a partition (From: Jason Bobier <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.