mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-27 23:34:51 +00:00
e1531466e1
This change updates grub to the 2.04 release. The new release changed how grub is built, so the bootstrap and bootstrap.conf files have to be added to the dist-git. Also, the gitignore file changed so it has to be updated. Since the patches have been forward ported to 2.04, there's no need for a logic to maintain a patch with the delta between the release and the grub master branch. So the release-to-master.patch is dropped and no longer is updated by the do-rebase script. Also since gnulib isn't part of the grub repository anymore and cloned by the boostrap tool, a gnulib tarball is included as other source file and copied before calling the bootstrap tool. That way grub can be built even in builders that only have access to the sources lookaside cache. Resolves: rhbz#1727279 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
60 lines
1.7 KiB
Diff
60 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Thu, 30 Nov 2017 15:11:39 -0500
|
|
Subject: [PATCH] Add grub_debug_enabled()
|
|
|
|
---
|
|
grub-core/kern/misc.c | 21 ++++++++++++++++-----
|
|
include/grub/misc.h | 1 +
|
|
2 files changed, 17 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
|
index 636f97e1ba1..e758ab3416d 100644
|
|
--- a/grub-core/kern/misc.c
|
|
+++ b/grub-core/kern/misc.c
|
|
@@ -159,17 +159,28 @@ int grub_err_printf (const char *fmt, ...)
|
|
__attribute__ ((alias("grub_printf")));
|
|
#endif
|
|
|
|
+int
|
|
+grub_debug_enabled (const char * condition)
|
|
+{
|
|
+ const char *debug;
|
|
+
|
|
+ debug = grub_env_get ("debug");
|
|
+ if (!debug)
|
|
+ return 0;
|
|
+
|
|
+ if (grub_strword (debug, "all") || grub_strword (debug, condition))
|
|
+ return 1;
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
void
|
|
grub_real_dprintf (const char *file, const int line, const char *condition,
|
|
const char *fmt, ...)
|
|
{
|
|
va_list args;
|
|
- const char *debug = grub_env_get ("debug");
|
|
|
|
- if (! debug)
|
|
- return;
|
|
-
|
|
- if (grub_strword (debug, "all") || grub_strword (debug, condition))
|
|
+ if (grub_debug_enabled (condition))
|
|
{
|
|
grub_printf ("%s:%d: ", file, line);
|
|
va_start (args, fmt);
|
|
diff --git a/include/grub/misc.h b/include/grub/misc.h
|
|
index b4339222ecb..4a4f485a5f6 100644
|
|
--- a/include/grub/misc.h
|
|
+++ b/include/grub/misc.h
|
|
@@ -367,6 +367,7 @@ grub_puts (const char *s)
|
|
}
|
|
|
|
int EXPORT_FUNC(grub_puts_) (const char *s);
|
|
+int EXPORT_FUNC(grub_debug_enabled) (const char *condition);
|
|
void EXPORT_FUNC(grub_real_dprintf) (const char *file,
|
|
const int line,
|
|
const char *condition,
|