[OpenBIOS] [commit] r1079 - trunk/openbios-devel/fs/hfsplus

repository service svn at openbios.org
Thu Dec 13 22:30:24 CET 2012


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 at gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at 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;



More information about the OpenBIOS mailing list