* include/grub/efi/api.h (GRUB_EFI_DEVICE_PATH_LENGTH): Use

grub_get_unaligned16 rather than shifts.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-04-28 15:15:57 +02:00
parent 178c276419
commit bd69257a77
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2013-04-28 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/efi/api.h (GRUB_EFI_DEVICE_PATH_LENGTH): Use
grub_get_unaligned16 rather than shifts.
2013-04-28 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/file.c: Use const char * rather than casting to

View file

@ -553,8 +553,7 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t;
#define GRUB_EFI_DEVICE_PATH_TYPE(dp) ((dp)->type & 0x7f)
#define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp) ((dp)->subtype)
#define GRUB_EFI_DEVICE_PATH_LENGTH(dp) \
((dp)->length[0] | ((grub_efi_uint16_t) ((dp)->length[1]) << 8))
#define GRUB_EFI_DEVICE_PATH_LENGTH(dp) (grub_get_unaligned16 ((dp)->length))
/* The End of Device Path nodes. */
#define GRUB_EFI_END_DEVICE_PATH_TYPE (0xff & 0x7f)