j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Thu Dec 13 22:30:23 2012 New Revision: 1079 URL: http://tracker.coreboot.org/trac/openbios/changeset/1079
Log: mac-parts.c: Fix detection of wrapped HFS+ volumes.
The code for checking for a wrapped HFS+ volume looks at the wrong offset. The offset of the magic number for the wrapped volume is 0x7c, but vol is declared as a uint16 meaning the correct array index to check is 0x3e (see http://developer.apple.com/library/mac/#technotes/tn/tn1150.html).
Signed-off-by: William Hahne will07c5@gmail.com Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/fs/hfsplus/hfsp_volume.c
Modified: trunk/openbios-devel/fs/hfsplus/hfsp_volume.c ============================================================================== --- trunk/openbios-devel/fs/hfsplus/hfsp_volume.c Sun Dec 9 21:37:53 2012 (r1078) +++ trunk/openbios-devel/fs/hfsplus/hfsp_volume.c Thu Dec 13 22:30:23 2012 (r1079) @@ -311,7 +311,7 @@ os_read(fd, vol, 2, HFSP_BLOCKSZ_BITS);
if (__be16_to_cpu(vol[0]) == HFS_VOLHEAD_SIG && - __be16_to_cpu(vol[0x7c]) == HFSP_VOLHEAD_SIG) { + __be16_to_cpu(vol[0x3e]) == HFSP_VOLHEAD_SIG) { ret = -1; } else if (__be16_to_cpu(vol[0]) == HFSP_VOLHEAD_SIG) { ret = -1;