[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] HFS+ wrapper support
From: |
Marco Gerards |
Subject: |
Re: [patch] HFS+ wrapper support |
Date: |
Mon, 02 Jan 2006 22:00:15 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Hollis Blanchard <address@hidden> writes:
> This patch (sent mostly for Marco) adds HFS wrapper support to the
> HFS+ code. All Apple-created HFS+ partitions are contained in an HFS
> wrapper for some backwards compatibility. The code is based on
> information found at
> http://developer.apple.com/technotes/tn/tn1150.html#HFSWrapper .
That's the information I used to implement HFS+ support.
> I only moved the minimum HFS code and structures into hfs.h. More
> could go there if desired.
Right, it seems sane to me.
> When I tested this patch, an embedded filesystem was recognized as
> HFS+, but the HFS+ code itself did not discover any files, so there is
> probably still something wrong.
Perhaps it is just my code that is wrong, who knows. :-)
Can you extract the HFS+ filesystem using `dd' to see if that works?
> +/* This is the offset into the physical disk for an embedded HFS+ filesystem
> + * (one inside a plain HFS wrapper). */
> +static int embedded_offset = 0;
This should be moved into grub_hfsplus_data. In case multiple HFS+
partitions are accessed things can go wrong here.
> + embedded_offset = ablk_start + extent_start * (ablk_size / 512);
Better to use ablk_size >> GRUB_DISK_SECTOR_BITS here.
> + if ((volheader.hfsplus.magic != GRUB_HFSPLUS_MAGIC)
> + && (volheader.hfsplus.magic != GRUB_HFSPLUSX_MAGIC))
You could keep the existing check. But if you prefer checking it as
integers, make sure the endianess is fixed.
Thanks,
Marco