mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 07:44:52 +00:00
f74b50e380
Signed-off-by: Peter Jones <pjones@redhat.com>
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 9609731b185923ba8ce177b0c8a0679b876c8f1a Mon Sep 17 00:00:00 2001
|
|
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
Date: Sun, 28 Apr 2013 15:15:57 +0200
|
|
Subject: [PATCH 377/482] * include/grub/efi/api.h
|
|
(GRUB_EFI_DEVICE_PATH_LENGTH): Use grub_get_unaligned16 rather than
|
|
shifts.
|
|
|
|
---
|
|
ChangeLog | 5 +++++
|
|
include/grub/efi/api.h | 3 +--
|
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
index da92415..727a8c8 100644
|
|
--- a/ChangeLog
|
|
+++ b/ChangeLog
|
|
@@ -1,5 +1,10 @@
|
|
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
|
|
non-const.
|
|
|
|
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
|
|
index 2917d14..69bcd0c 100644
|
|
--- a/include/grub/efi/api.h
|
|
+++ b/include/grub/efi/api.h
|
|
@@ -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)
|
|
--
|
|
1.8.2.1
|
|
|