grub2/0104-Add-grub_qdprintf-grub_dprintf-without-the-file-line.patch
Javier Martinez Canillas e1531466e1
Update to grub 2.04
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>
2019-08-15 08:04:53 +02:00

56 lines
1.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Sun, 28 Jun 2015 13:09:58 -0400
Subject: [PATCH] Add grub_qdprintf() - grub_dprintf() without the file+line
number.
This just makes copy+paste of our debug loading info easier.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/kern/misc.c | 18 ++++++++++++++++++
include/grub/misc.h | 2 ++
2 files changed, 20 insertions(+)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index 5c2d2039d0b..0e89c483d5e 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -190,6 +190,24 @@ grub_real_dprintf (const char *file, const int line, const char *condition,
}
}
+void
+grub_qdprintf (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))
+ {
+ va_start (args, fmt);
+ grub_vprintf (fmt, args);
+ va_end (args);
+ grub_refresh ();
+ }
+}
+
#define PREALLOC_SIZE 255
int
diff --git a/include/grub/misc.h b/include/grub/misc.h
index 4a4f485a5f6..960097fbd06 100644
--- a/include/grub/misc.h
+++ b/include/grub/misc.h
@@ -372,6 +372,8 @@ void EXPORT_FUNC(grub_real_dprintf) (const char *file,
const int line,
const char *condition,
const char *fmt, ...) __attribute__ ((format (GNU_PRINTF, 4, 5)));
+void EXPORT_FUNC(grub_qdprintf) (const char *condition,
+ const char *fmt, ...) __attribute__ ((format (GNU_PRINTF, 2, 3)));
int EXPORT_FUNC(grub_vprintf) (const char *fmt, va_list args);
int EXPORT_FUNC(grub_snprintf) (char *str, grub_size_t n, const char *fmt, ...)
__attribute__ ((format (GNU_PRINTF, 3, 4)));