Re: finding the offset of a partition
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jTNiG24f/R4y5gU9wkS7PVLYW/q7Um29rEEYc83vSMm92r4n+pbxqNJuT6jKIUCuFgauHzJHWBtEvjCsRSQ6+Q8WLx2TpUnxIGzCVq8cxuComHcqXK2sFCGinyHnDSfaCf0UgLKl6tJKMDCKzdPX5iB/HSIBST5+FJCrR4JSEXg= On 2/3/06, Jason Bobier <jason@prismatix.com> wrote:
In the driver, the disk and the partition are represented by IOMedia objects and you can use getBase on the partition to know where it is relative to the disk. So the system knows how the two are related.
I'm trying to get the offset on disk of a particular file. In order to do this I use F_LOG2PHYS which gives me the offset from the beginning of the partition. So I need to add the partition offset somehow.
Are you doing raw access to the whole disk? or to a slice (partition) of that disk? The offset may already be dealt with for you depending on how you are doing your IO. -Shawn _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Shawn Erickson