Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EtWoY-00049I-QX for mharc-grub-devel@gnu.org; Mon, 02 Jan 2006 16:01:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EtWoW-00048u-Td for grub-devel@gnu.org; Mon, 02 Jan 2006 16:01:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EtWoV-00048g-DZ for grub-devel@gnu.org; Mon, 02 Jan 2006 16:01:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EtWoV-00048d-Ad for grub-devel@gnu.org; Mon, 02 Jan 2006 16:01:55 -0500 Received: from [194.109.24.30] (helo=smtp-vbr10.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EtWpb-00028Z-Tb for grub-devel@gnu.org; Mon, 02 Jan 2006 16:03:04 -0500 Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by smtp-vbr10.xs4all.nl (8.13.3/8.13.3) with ESMTP id k02L0Ew8078069 for ; Mon, 2 Jan 2006 22:00:14 +0100 (CET) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <0592330b85aa3112f3b3d91f62791811@penguinppc.org> From: Marco Gerards Date: Mon, 02 Jan 2006 22:00:15 +0100 In-Reply-To: <0592330b85aa3112f3b3d91f62791811@penguinppc.org> (Hollis Blanchard's message of "Mon, 2 Jan 2006 14:33:49 -0600") Message-ID: <87r77qibvk.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: [patch] HFS+ wrapper support X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2006 21:01:57 -0000 Hollis Blanchard 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