SHA256
1
0
forked from pool/grub2

Accepting request 252657 from home:arvidjaar:grub2-next

fix btrfs on big endian systems (ppc/ppc64) - patch from upstream.

OBS-URL: https://build.opensuse.org/request/show/252657
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=120
This commit is contained in:
Michael Chang 2014-09-29 07:00:39 +00:00 committed by Git OBS Bridge
parent a3b3be5746
commit 1336b185ee
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 4afd0107efa6a2d9cbe6fc71c529264dc2b9fb8a 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] 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/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.4.5

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Sep 28 06:16:35 UTC 2014 - arvidjaar@gmail.com
- fix btrfs on big endian systems (ppc/ppc64)
* add grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Sep 21 06:47:12 UTC 2014 - arvidjaar@gmail.com Sun Sep 21 06:47:12 UTC 2014 - arvidjaar@gmail.com

View File

@ -156,6 +156,7 @@ Patch44: grub2-glibc-2.20.patch
Patch45: grub2-efinet-reopen-SNP-protocol-for-exclusive-use-by-grub.patch Patch45: grub2-efinet-reopen-SNP-protocol-for-exclusive-use-by-grub.patch
Patch46: grub2-xen-legacy-config-device-name.patch Patch46: grub2-xen-legacy-config-device-name.patch
Patch47: grub2-Initialized-initrd_ctx-so-we-don-t-free-a-random-poi.patch Patch47: grub2-Initialized-initrd_ctx-so-we-don-t-free-a-random-poi.patch
Patch48: grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch
# Btrfs snapshot booting related patches # Btrfs snapshot booting related patches
Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch
Patch102: grub2-btrfs-02-export-subvolume-envvars.patch Patch102: grub2-btrfs-02-export-subvolume-envvars.patch
@ -361,6 +362,7 @@ mv po/grub.pot po/%{name}.pot
%patch45 -p1 %patch45 -p1
%patch46 -p1 %patch46 -p1
%patch47 -p1 %patch47 -p1
%patch48 -p1
%patch101 -p1 %patch101 -p1
%patch102 -p1 %patch102 -p1
%patch103 -p1 %patch103 -p1