8 Star 0 Fork 11

src-anolis-os/grubby

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0023-Ensure-command-line-updates-also-honor-set-index.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import grubby-8.40-38.el8.src.rpm
From f88808a37044c323e35eda49dbc326dcf260439b Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Fri, 24 Jun 2016 16:05:45 -0400
Subject: [PATCH 23/55] Ensure command line updates also honor --set-index
Related: rhbz#1285601
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grubby.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/grubby.c b/grubby.c
index 54625e7da0a..d889399449b 100644
--- a/grubby.c
+++ b/grubby.c
@@ -4212,11 +4212,17 @@ int addNewKernel(struct grubConfig *config, struct singleEntry *template,
struct singleEntry *new, *entry, *prev = NULL;
struct singleLine *newLine = NULL, *tmplLine = NULL, *masterLine = NULL;
int needs;
+ char *indexs;
char *chptr;
+ int rc;
if (!newKernelPath)
return 0;
+ rc = asprintf(&indexs, "%d", newIndex);
+ if (rc < 0)
+ return 1;
+
/* if the newKernelTitle is too long silently munge it into something
* we can live with. truncating is first check, then we'll just mess with
* it until it looks better */
@@ -4715,7 +4721,7 @@ int addNewKernel(struct grubConfig *config, struct singleEntry *template,
abort();
}
- if (updateImage(config, "0", prefix, newKernelArgs, NULL,
+ if (updateImage(config, indexs, prefix, newKernelArgs, NULL,
newMBKernelArgs, NULL))
return 1;
--
2.17.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/grubby.git
git@gitee.com:src-anolis-os/grubby.git
src-anolis-os
grubby
grubby
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385