Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WTFKE-0005nl-NR for mharc-grub-devel@gnu.org; Thu, 27 Mar 2014 14:46:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTFK7-0005Zk-1e for grub-devel@gnu.org; Thu, 27 Mar 2014 14:46:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTFK1-0008DG-32 for grub-devel@gnu.org; Thu, 27 Mar 2014 14:46:42 -0400 Received: from [32.97.110.56] (port=59403 helo=venice.austin.ibm.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTFK0-0008D9-La for grub-devel@gnu.org; Thu, 27 Mar 2014 14:46:37 -0400 Received: from venice.austin.ibm.com (localhost [127.0.0.1]) by venice.austin.ibm.com (8.14.7/8.14.7) with ESMTP id s2RIQWYG039349; Thu, 27 Mar 2014 14:26:32 -0400 Received: (from tlfalcon@localhost) by venice.austin.ibm.com (8.14.7/8.14.7/Submit) id s2RIQWFO039348; Thu, 27 Mar 2014 14:26:32 -0400 From: Thomas Falcon To: grub-devel@gnu.org Subject: [PATCH] btrfs: fix get_root key comparison failures due to endianness Date: Thu, 27 Mar 2014 14:26:30 -0400 Message-Id: <1395944790-39311-1-git-send-email-tlfalcon@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 32.97.110.56 Cc: Thomas Falcon X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 18:46:49 -0000 Key in/out value comparison conditional failing in get_root due to endianess issues. Signed-off-by: Thomas Falcon --- grub-core/fs/btrfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index 89666b6..f7b6c15 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c @@ -1201,7 +1201,7 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key, struct grub_btrfs_key key_out, key_in; struct grub_btrfs_root_item ri; - key_in.object_id = GRUB_BTRFS_ROOT_VOL_OBJECTID; + key_in.object_id = grub_cpu_to_le64_compile_time (GRUB_BTRFS_ROOT_VOL_OBJECTID); key_in.offset = 0; key_in.type = GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM; err = lower_bound (data, &key_in, &key_out, -- 1.8.3.1