dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0071-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch

0dc71c
From bd2125649cbeae60a5caff05d5a39c88a4e6eff6 Mon Sep 17 00:00:00 2001
0dc71c
From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
0dc71c
Date: Mon, 31 Mar 2014 15:32:30 +0100
0dc71c
Subject: [PATCH 071/143] btrfs: fix get_root key comparison failures due to
0dc71c
 endianness
0dc71c
0dc71c
* grub-core/fs/btrfs.c (get_root): Convert
0dc71c
GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian.
0dc71c
---
0dc71c
 ChangeLog            | 7 +++++++
0dc71c
 grub-core/fs/btrfs.c | 2 +-
0dc71c
 2 files changed, 8 insertions(+), 1 deletion(-)
0dc71c
0dc71c
diff --git a/ChangeLog b/ChangeLog
0dc71c
index 1cb3b68..accffad 100644
0dc71c
--- a/ChangeLog
0dc71c
+++ b/ChangeLog
0dc71c
@@ -1,3 +1,10 @@
0dc71c
+2014-03-31  Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
0dc71c
+
0dc71c
+	btrfs: fix get_root key comparison failures due to endianness
0dc71c
+
0dc71c
+	* grub-core/fs/btrfs.c (get_root): Convert
0dc71c
+	GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian.
0dc71c
+
0dc71c
 2014-03-31  Colin Watson  <cjwatson@ubuntu.com>
0dc71c
 
0dc71c
 	Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
0dc71c
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
0dc71c
index 89666b6..f7b6c15 100644
0dc71c
--- a/grub-core/fs/btrfs.c
0dc71c
+++ b/grub-core/fs/btrfs.c
0dc71c
@@ -1201,7 +1201,7 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key,
0dc71c
   struct grub_btrfs_key key_out, key_in;
0dc71c
   struct grub_btrfs_root_item ri;
0dc71c
 
0dc71c
-  key_in.object_id = GRUB_BTRFS_ROOT_VOL_OBJECTID;
0dc71c
+  key_in.object_id = grub_cpu_to_le64_compile_time (GRUB_BTRFS_ROOT_VOL_OBJECTID);
0dc71c
   key_in.offset = 0;
0dc71c
   key_in.type = GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM;
0dc71c
   err = lower_bound (data, &key_in, &key_out,
0dc71c
-- 
0dc71c
1.9.3
0dc71c