forked from pool/grub2
edf621776c
- Fix btrfs subvol detection on BigEndian systems (bsc#933541) * modified grub2-btrfs-06-subvol-mount.patch - Fix grub2-mkrelpath outputs wrong path on BigEndian system * added grub2-getroot-fix-get-btrfs-fs-prefix-big-endian.patch OBS-URL: https://build.opensuse.org/request/show/312487 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=169
26 lines
857 B
Diff
26 lines
857 B
Diff
Index: grub-2.02~beta2/grub-core/osdep/linux/getroot.c
|
|
===================================================================
|
|
--- grub-2.02~beta2.orig/grub-core/osdep/linux/getroot.c
|
|
+++ grub-2.02~beta2/grub-core/osdep/linux/getroot.c
|
|
@@ -324,9 +324,9 @@ get_btrfs_fs_prefix (const char *mount_p
|
|
|
|
tree_id = sargs.buf[2];
|
|
br = (struct grub_btrfs_root_backref *) (sargs.buf + 4);
|
|
- inode_id = br->inode_id;
|
|
+ inode_id = grub_le_to_cpu64 (br->inode_id);
|
|
name = br->name;
|
|
- namelen = br->n;
|
|
+ namelen = grub_le_to_cpu16 (br->n);
|
|
}
|
|
else
|
|
{
|
|
@@ -353,7 +353,7 @@ get_btrfs_fs_prefix (const char *mount_p
|
|
|
|
ir = (struct grub_btrfs_inode_ref *) (sargs.buf + 4);
|
|
name = ir->name;
|
|
- namelen = ir->n;
|
|
+ namelen = grub_le_to_cpu16 (ir->n);
|
|
}
|
|
old = ret;
|
|
ret = xmalloc (namelen + (old ? strlen (old) : 0) + 2);
|