1 Star 0 Fork 50

Sevever/grub2_an

forked from src-anolis-os/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0205-blscfg-fix-compilation-on-EFI-and-EMU.patch 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 15:15 . update to grub2-2.02-120.el8.src.rpm
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Will Thompson <[email protected]>
Date: Thu, 12 Jul 2018 19:00:42 +0100
Subject: [PATCH] blscfg: fix compilation on !EFI and !EMU
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Neither GRUB_MACHINE_EFI nor GRUB_MACHINE_EMU are defined when compiling
for (eg) i386-pc. In this case, #elif GRUB_MACHINE_EMU is an error:
commands/blscfg.c: In function ‘grub_cmd_blscfg’:
commands/blscfg.c:835:7: error: "GRUB_MACHINE_EMU" is not defined [-Werror=undef]
#elif GRUB_MACHINE_EMU
^~~~~~~~~~~~~~~~
Signed-off-by: Will Thompson <[email protected]>
---
grub-core/commands/blscfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
index 11a356de8..53676576b 100644
--- a/grub-core/commands/blscfg.c
+++ b/grub-core/commands/blscfg.c
@@ -843,7 +843,7 @@ grub_cmd_blscfg (grub_extcmd_context_t ctxt UNUSED,
info.platform = PLATFORM_EFI;
grub_dprintf ("blscfg", "scanning /EFI/\n");
r = fs->dir (dev, "/EFI/", find_entry, &info);
-#elif GRUB_MACHINE_EMU
+#elif defined(GRUB_MACHINE_EMU)
info.platform = PLATFORM_EMU;
grub_dprintf ("blscfg", "scanning %s%s\n", GRUB_BOOT_DEVICE,
GRUB_BLS_CONFIG_PATH);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sevever/grub2_an.git
[email protected]:sevever/grub2_an.git
sevever
grub2_an
grub2_an
a8

搜索帮助