加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
skip-verification-when-not-loading-grub.cfg.patch 928 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhangqiumiao 提交于 2024-03-04 03:17 . update to 2.12
From c8b6446348a445a51024d04b2e8e5b417c3a1f73 Mon Sep 17 00:00:00 2001
From: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Date: Wed, 31 May 2023 15:13:07 +0800
Subject: [PATCH] skip verification when not loading grub.cfg
Skip verification when just opening the grub.cfg without loading it.
There is no need to verify grub.cfg twice when tpcm is enabled.
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
---
grub-core/normal/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 1b426af..be6b7a3 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -128,7 +128,7 @@ read_config_file (const char *config)
}
/* Try to open the config file. */
- rawfile = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
+ rawfile = grub_file_open (config, GRUB_FILE_TYPE_SKIP_SIGNATURE);
if (! rawfile)
return 0;
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化