2010-02-13 Vladimir Serbinenko <phcoder@gmail.com>

Properly create cross-endian images.

	* include/grub/types.h (grub_host_to_target_addr): New macro
	* util/grub-mkrawimage.c (generate_image): Add missing host_to_target.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-13 15:40:13 +01:00
parent 82da2062d8
commit b274d734f3
3 changed files with 20 additions and 7 deletions

View file

@ -223,4 +223,10 @@ static inline grub_uint64_t grub_swap_bytes64(grub_uint64_t x)
# endif
#endif /* ! WORDS_BIGENDIAN */
#if GRUB_TARGET_SIZEOF_VOID_P == 8
# define grub_host_to_target_addr(x) grub_host_to_target64(x)
#else
# define grub_host_to_target_addr(x) grub_host_to_target32(x)
#endif
#endif /* ! GRUB_TYPES_HEADER */