Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EelN0-0007XB-1e for mharc-grub-devel@gnu.org; Tue, 22 Nov 2005 22:32:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EelMx-0007Uz-My for grub-devel@gnu.org; Tue, 22 Nov 2005 22:32:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EelMw-0007TJ-4G for grub-devel@gnu.org; Tue, 22 Nov 2005 22:32:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EelMw-0007TG-0h for grub-devel@gnu.org; Tue, 22 Nov 2005 22:32:26 -0500 Received: from [209.86.89.66] (helo=smtpauth06.mail.atl.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EelMw-0001aD-2S for grub-devel@gnu.org; Tue, 22 Nov 2005 22:32:26 -0500 Received: from [63.246.184.80] (helo=[192.168.0.101]) by smtpauth06.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1EelMv-0000A3-9E for grub-devel@gnu.org; Tue, 22 Nov 2005 22:32:25 -0500 Mime-Version: 1.0 (Apple Message framework v623) Content-Transfer-Encoding: 7bit Message-Id: <98fa050875c32d1ca3bbc3ae561928ef@penguinppc.org> Content-Type: text/plain; charset=US-ASCII; format=flowed To: The development of GRUB 2 From: Hollis Blanchard Date: Tue, 22 Nov 2005 21:32:24 -0600 X-Mailer: Apple Mail (2.623) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec798d5ddb051d5b2c4286dc7b4a80ec8382350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 Subject: UFS byte swapping 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: Wed, 23 Nov 2005 03:32:27 -0000 This warning has been annoying me for quite some time: ../fs/ufs.c: In function `grub_ufs_find_file': ../fs/ufs.c:474: warning: declaration of `_x' shadows a previous local ../fs/ufs.c:474: warning: shadowed declaration is here ../fs/ufs.c:474: warning: declaration of `_x' shadows a previous local ../fs/ufs.c:474: warning: shadowed declaration is here The line in question: } while (pos < grub_le_to_cpu32 (INODE_SIZE (data))); This warning coincidentally calls attention to a bug that would otherwise be unnoticed. From a look at INODE_SIZE, you can see that "data" is being swapped twice. On big-endian systems it will be done twice; on wrong-endian it won't happen at all. Based on that, and other users of INODE_SIZE, I'm going to remove the extra swap, but I would like to know how this code can be tested. -Hollis