1 Star 0 Fork 83

dingwei / grub2

forked from src-openEuler / grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0094-align-struct-efi_variable-better.patch 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
hanzj0122_admin 提交于 2020-07-29 20:47 . update to 2.04
From d49469ac1d2173db50595517e4bb8d5fe8f2a68b Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 27 Feb 2018 13:55:35 -0500
Subject: [PATCH 094/220] align struct efi_variable better...
---
include/grub/efiemu/runtime.h | 2 +-
include/grub/types.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
index 36d2ded..9d93ba8 100644
--- a/include/grub/efiemu/runtime.h
+++ b/include/grub/efiemu/runtime.h
@@ -33,5 +33,5 @@ struct efi_variable
grub_uint32_t namelen;
grub_uint32_t size;
grub_efi_uint32_t attributes;
-} GRUB_PACKED;
+} GRUB_PACKED GRUB_ALIGNED(8);
#endif /* ! GRUB_EFI_EMU_RUNTIME_HEADER */
diff --git a/include/grub/types.h b/include/grub/types.h
index 035a4b5..2fc4be4 100644
--- a/include/grub/types.h
+++ b/include/grub/types.h
@@ -29,6 +29,7 @@
#else
#define GRUB_PACKED __attribute__ ((packed))
#endif
+#define GRUB_ALIGNED(x) __attribute__((aligned (x)))
#ifdef GRUB_BUILD
# define GRUB_CPU_SIZEOF_VOID_P BUILD_SIZEOF_VOID_P
--
1.8.3.1
1
https://gitee.com/dingwei_chinamobile/grub2.git
git@gitee.com:dingwei_chinamobile/grub2.git
dingwei_chinamobile
grub2
grub2
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891