代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Will Thompson <wjt@endlessm.com>
Date: Thu, 12 Jul 2018 10:38:27 +0100
Subject: [PATCH] blscfg: fix filename in "no 'linux' key" error
In find_entry(), 'filename' is either NULL or a directory in the ESP.
But previously it was passed to create_entry(), which uses it in an
error message as if it's the filename of the BLS entry in question.
Since bls_entry now has a 'filename' field, just use that.
Signed-off-by: Will Thompson <wjt@endlessm.com>
---
grub-core/commands/blscfg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
index bd78559ef..a45f40fe6 100644
--- a/grub-core/commands/blscfg.c
+++ b/grub-core/commands/blscfg.c
@@ -514,7 +514,7 @@ static char **bls_make_list (struct bls_entry *entry, const char *key, int *num)
return list;
}
-static void create_entry (struct bls_entry *entry, const char *cfgfile)
+static void create_entry (struct bls_entry *entry)
{
int argc = 0;
const char **argv = NULL;
@@ -539,7 +539,7 @@ static void create_entry (struct bls_entry *entry, const char *cfgfile)
clinux = bls_get_val (entry, "linux", NULL);
if (!clinux)
{
- grub_dprintf ("blscfg", "Skipping file %s with no 'linux' key.\n", cfgfile);
+ grub_dprintf ("blscfg", "Skipping file %s with no 'linux' key.\n", entry->filename);
goto finish;
}
@@ -753,7 +753,7 @@ static int find_entry (const char *filename,
grub_dprintf ("blscfg", "%s Creating %d entries from bls\n", __func__, nentries);
for (r = nentries - 1; r >= 0; r--)
- create_entry(entries[r], filename);
+ create_entry(entries[r]);
for (r = 0; r < nentries; r++)
bls_free_entry (entries[r]);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。