]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
kern/misc: Add debug log condition to log output
authorGlenn Washburn <development@efficientek.com>
Tue, 19 Oct 2021 06:47:03 +0000 (01:47 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 25 Oct 2021 14:23:34 +0000 (16:23 +0200)
Adding the conditional to debug log messages allows the GRUB user to
construct the $debug variable without needing to consult the source to
find the conditional (especially useful for situations where the source
is not readily available).

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/kern/misc.c

index 3af336ee22753e620531f34c668f1c07ea9ba1ee..11b8592c8010bd2aa88b1c58dcfd3e3dd756a9bd 100644 (file)
@@ -182,7 +182,7 @@ grub_real_dprintf (const char *file, const int line, const char *condition,
 
   if (grub_debug_enabled (condition))
     {
-      grub_printf ("%s:%d: ", file, line);
+      grub_printf ("%s:%d:%s: ", file, line, condition);
       va_start (args, fmt);
       grub_vprintf (fmt, args);
       va_end (args);