代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <[email protected]>
Date: Thu, 24 Mar 2022 14:40:01 -0400
Subject: [PATCH] misc: make grub_boot_time() also call
grub_dprintf("boot",...)
Currently grub_boot_time() includes valuable debugging messages, but if
you build without BOOT_TIME_STATS enabled, they are silently and
confusingly compiled away.
This patch changes grub_boot_time() to also log when "boot" is enabled
in DEBUG, regardless of BOOT_TIME_STATS.
Signed-off-by: Peter Jones <[email protected]>
(cherry picked from commit 4fd282de00df05ce289467861deb7a0e186cfbd7)
(cherry picked from commit cc7e60a9f3ad1fa74b9cd48a7e66b1976f9a554a)
---
grub-core/kern/misc.c | 3 ++-
include/grub/misc.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index 859d71659a..b375e486a4 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -1336,7 +1336,8 @@ grub_real_boot_time (const char *file,
n->next = 0;
va_start (args, fmt);
- n->msg = grub_xvasprintf (fmt, args);
+ n->msg = grub_xvasprintf (fmt, args);
+ grub_dprintf ("boot", "%s\n", n->msg);
va_end (args);
*boot_time_last = n;
diff --git a/include/grub/misc.h b/include/grub/misc.h
index 7ef1a1a87e..1b722c8185 100644
--- a/include/grub/misc.h
+++ b/include/grub/misc.h
@@ -529,7 +529,7 @@ void EXPORT_FUNC(grub_real_boot_time) (const char *file,
const char *fmt, ...) __attribute__ ((format (GNU_PRINTF, 3, 4)));
#define grub_boot_time(...) grub_real_boot_time(GRUB_FILE, __LINE__, __VA_ARGS__)
#else
-#define grub_boot_time(...)
+#define grub_boot_time(fmt, ...) grub_dprintf("boot", fmt "\n", ##__VA_ARGS__)
#endif
#define _grub_min(a, b, _a, _b) \
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。