Hollis Blanchard <[EMAIL PROTECTED]> 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 _______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
