1 Star 0 Fork 17

yangchunc/efibootmgr

forked from src-openEuler/efibootmgr 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-efibootmgr-delete_bootnext-is-just-a-boolean-not-an-entry-id.patch 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
zhangxingrong 提交于 2024-06-17 13:43 +08:00 . add some patchs from upstream
From 0ca99d442e9d0a49d3ec373413d781ca392b57bc Mon Sep 17 00:00:00 2001
From: Dima Zavin <dmitriyz@waymo.com>
Date: Mon, 8 Jan 2024 11:23:20 -0800
Subject: [PATCH] efibootmgr: delete_bootnext is just a boolean, not an entry
id
When deleting bootnext, there's nothing to validate (other than
the variable existing, in which case del will fail as expected).
This appears to be a copy/paste error when adding the delete-bootnext
option from the [create] bootnext option.
Signed-off-by: Dima Zavin <dmitriyz@waymo.com>
---
src/efibootmgr.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/efibootmgr.c b/src/efibootmgr.c
index b35fcf4..6f51d33 100644
--- a/src/efibootmgr.c
+++ b/src/efibootmgr.c
@@ -1928,10 +1928,6 @@ main(int argc, char **argv)
}
if (opts.delete_bootnext) {
- if (!is_current_entry(opts.delete_bootnext))
- errorx(17, "Boot entry %04X does not exist",
- opts.delete_bootnext);
-
ret = efi_del_variable(EFI_GLOBAL_GUID, "BootNext");
if (ret < 0)
error(10, "Could not delete BootNext");
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yangchunc/efibootmgr.git
git@gitee.com:yangchunc/efibootmgr.git
yangchunc
efibootmgr
efibootmgr
master

搜索帮助