grub2/0071-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch
Peter Jones 58fe9aa736 Various updates that came from rhel 7.1 work.
- Clean up the build a bit to make it faster
- Make grubenv work right on UEFI machines
  Related: rhbz#1119943
- Sort debug and rescue kernels later than normal ones
  Related: rhbz#1065360
- Allow "fallback" to include entries by title as well as number.
  Related: rhbz#1026084
- Fix a segfault on aarch64.
- Load arm with SB enabled if available.
- Add some serial port options to GRUB_MODULES.

Signed-off-by: Peter Jones <pjones@redhat.com>
2014-09-29 11:52:02 -04:00

44 lines
1.5 KiB
Diff

From bd2125649cbeae60a5caff05d5a39c88a4e6eff6 Mon Sep 17 00:00:00 2001
From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date: Mon, 31 Mar 2014 15:32:30 +0100
Subject: [PATCH 071/152] btrfs: fix get_root key comparison failures due to
endianness
* grub-core/fs/btrfs.c (get_root): Convert
GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian.
---
ChangeLog | 7 +++++++
grub-core/fs/btrfs.c | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1cb3b68..accffad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-03-31 Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
+
+ btrfs: fix get_root key comparison failures due to endianness
+
+ * grub-core/fs/btrfs.c (get_root): Convert
+ GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian.
+
2014-03-31 Colin Watson <cjwatson@ubuntu.com>
Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
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.9.3