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



OK, thx. I actually do have a filter scheme on the stack so I could just ask it to find the base of the IOMedia partition below it. Hmm... Actually, I can pass DKIOCGETBASE to the rdisk and it works.

That ioctl is only listed in the kernel framework for some reason but works from userland.

Jason


--

Jason Bobier            email@hidden

Space Cowboy            http://www.prismatix.com/


Firmly grounded in my dreams.



On Feb 3, 2006, at 1:25 AM, Alexander von Below wrote:


Am 03.02.2006 um 07:49 schrieb Jason Bobier:

I can't seem to find a way to find the offset of a partition on a drive without reading the partition table myself. Is there an easy way to do this?

i.e. given disk1s1 what is it's offset from the beginning of disk1?

No, as Justin already suspected nothing inside a partition tells you anything about the location of that partition on the disk. And it would not make much sense either, as partitions are meant to be self-contained and portable. For example, you can easily copy a partition into a disk image without modifying anything within the partition.

Bottom line: You have to get access to the partition map.

Alex





________________________________________________________________
This message could have been secured by PGP Universal. To secure
future messages from this sender, please click this link:

https://keys.prismatix.com/b/b.e?r=email@hidden&n=nZyHwo255DU%2F6VzP%2BOTPvw%3D%3D
 _______________________________________________
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: Alexander von Below <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.