代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Will Thompson <[email protected]>
Date: Wed, 11 Jul 2018 15:01:45 +0100
Subject: [PATCH] blscfg: don't dynamically allocate default_blsdir
Signed-off-by: Will Thompson <[email protected]>
---
grub-core/commands/blscfg.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
index 82fb6cdd1..b61dddb7f 100644
--- a/grub-core/commands/blscfg.c
+++ b/grub-core/commands/blscfg.c
@@ -623,7 +623,7 @@ static int find_entry (const char *filename,
grub_file_t f = NULL;
char *grubenv_path = NULL;
grub_envblk_t env = NULL;
- char *default_blsdir = NULL;
+ const char *default_blsdir = NULL;
grub_fs_t blsdir_fs = NULL;
grub_device_t blsdir_dev = NULL;
const char *blsdir = NULL;
@@ -643,10 +643,9 @@ static int find_entry (const char *filename,
// set a default blsdir
if (info->platform == PLATFORM_EMU)
- default_blsdir = grub_xasprintf ("%s%s", GRUB_BOOT_DEVICE,
- GRUB_BLS_CONFIG_PATH);
+ default_blsdir = GRUB_BOOT_DEVICE GRUB_BLS_CONFIG_PATH;
else
- default_blsdir = grub_xasprintf ("%s", GRUB_BLS_CONFIG_PATH);
+ default_blsdir = GRUB_BLS_CONFIG_PATH;
grub_env_set ("blsdir", default_blsdir);
grub_dprintf ("blscfg", "default_blsdir: \"%s\"\n", default_blsdir);
@@ -788,8 +787,6 @@ finish:
if (f)
grub_file_close (f);
- grub_free (default_blsdir);
-
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。