代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Fri, 30 Nov 2018 16:39:09 +0100
Subject: [PATCH] Fix menu entry selection based on title
The get_entry_number_helper() function assumes that there could be a set
of entries identifiers in a variable (i.e: as used in the fallback case)
so iterates over the string until it finds a space to get the first id.
But this should only be done for indexes or entries id, since the title
can contain spaces. In the case of title, the complete string should be
used to select a given entry.
Resolves: rhbz#1654936
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
grub-core/normal/menu.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
index 95f7abaf2..fc25c702f 100644
--- a/grub-core/normal/menu.c
+++ b/grub-core/normal/menu.c
@@ -217,14 +217,11 @@ get_entry_number_helper(grub_menu_t menu,
for (i = 0, e = menu->entry_list; e; i++)
{
- int l = 0;
- while (val[l] && !grub_isspace(val[l]))
- l++;
- if (menuentry_eq (e->title, val, l))
+ if (menuentry_eq (e->title, val, -1))
{
if (tail)
- *tail = val + l;
+ *tail = NULL;
return i;
}
e = e->next;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。