All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: fix get_root key comparison failures due to endianness
@ 2014-03-27 18:26 Thomas Falcon
  2014-03-31 14:33 ` Colin Watson
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Falcon @ 2014-03-27 18:26 UTC (permalink / raw)
  To: grub-devel; +Cc: Thomas Falcon

Key in/out value comparison conditional failing in get_root
due to endianess issues.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
---
 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: fix get_root key comparison failures due to endianness
  2014-03-27 18:26 [PATCH] btrfs: fix get_root key comparison failures due to endianness Thomas Falcon
@ 2014-03-31 14:33 ` Colin Watson
  0 siblings, 0 replies; 2+ messages in thread
From: Colin Watson @ 2014-03-31 14:33 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Thomas Falcon

On Thu, Mar 27, 2014 at 02:26:30PM -0400, Thomas Falcon wrote:
> Key in/out value comparison conditional failing in get_root
> due to endianess issues.

Thanks, this looks sane and consistent with the rest of the code, and
from conversation elsewhere I gather that you've tested this in a
big-endian context.  I wrote a ChangeLog entry for you and pushed this.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-31 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-27 18:26 [PATCH] btrfs: fix get_root key comparison failures due to endianness Thomas Falcon
2014-03-31 14:33 ` Colin Watson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.