加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0207-blscfg-Get-rid-of-the-linuxefi-linux16-linux-distinc.patch 1.73 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: Peter Jones <pjones@redhat.com>
Date: Mon, 16 Jul 2018 11:00:50 -0400
Subject: [PATCH] blscfg: Get rid of the linuxefi/linux16/linux distinction
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/commands/blscfg.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
index 53676576b..c6addc4dc 100644
--- a/grub-core/commands/blscfg.c
+++ b/grub-core/commands/blscfg.c
@@ -43,14 +43,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_BOOT_DEVICE "($root)"
#endif
-#ifdef GRUB_MACHINE_EFI
-#define GRUB_LINUX_CMD "linuxefi"
-#define GRUB_INITRD_CMD "initrdefi"
-#else
-#define GRUB_LINUX_CMD "linux"
-#define GRUB_INITRD_CMD "initrd"
-#endif
-
enum
{
PLATFORM_EFI,
@@ -563,7 +555,7 @@ static void create_entry (struct bls_entry *entry)
title, id);
if (initrds)
{
- int initrd_size = sizeof (GRUB_INITRD_CMD);
+ int initrd_size = sizeof ("initrd");
char *tmp;
for (i = 0; initrds != NULL && initrds[i] != NULL; i++)
@@ -579,7 +571,7 @@ static void create_entry (struct bls_entry *entry)
}
- tmp = grub_stpcpy(initrd, GRUB_INITRD_CMD);
+ tmp = grub_stpcpy(initrd, "initrd ");
for (i = 0; initrds != NULL && initrds[i] != NULL; i++)
{
grub_dprintf ("blscfg", "adding initrd %s\n", initrds[i]);
@@ -592,7 +584,7 @@ static void create_entry (struct bls_entry *entry)
src = grub_xasprintf ("load_video\n"
"set gfx_payload=keep\n"
"insmod gzio\n"
- GRUB_LINUX_CMD " %s%s%s%s\n"
+ "linux %s%s%s%s\n"
"%s",
GRUB_BOOT_DEVICE, clinux, options ? " " : "", options ? options : "",
initrd ? initrd : "");
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化