加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0492-commands-search-Fix-bug-stopping-iteration-when-no-f.patch 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-05-11 18:31 . update to grub2-2.02-123.el8.src.rpm
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
Date: Tue, 8 Feb 2022 08:39:10 +0100
Subject: [PATCH] commands/search: Fix bug stopping iteration when --no-floppy
is used
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When using --no-floppy and a floppy was encountered, iterate_device()
was returning 1, causing the iteration to stop instead of continuing.
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
(cherry picked from commit 68ba54c2298604146be83cae144dafd1cfd1fe2d)
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
(cherry picked from commit 7ada55e3fcd16e00773d3918955b2b945b7f063a)
(cherry picked from commit 44a58e304fd06155a56b650927728af01bbc647d)
---
grub-core/commands/search.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c
index ddda6e7c5..d3180bf66 100644
--- a/grub-core/commands/search.c
+++ b/grub-core/commands/search.c
@@ -64,7 +64,7 @@ iterate_device (const char *name, void *data)
/* Skip floppy drives when requested. */
if (ctx->no_floppy &&
name[0] == 'f' && name[1] == 'd' && name[2] >= '0' && name[2] <= '9')
- return 1;
+ return 0;
#ifdef DO_SEARCH_FS_UUID
#define compare_fn grub_strcasecmp
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化