summaryrefslogtreecommitdiff
path: root/config/grub/xhci/patches/0013-don-t-print-empty-error-messages.patch
blob: 74d8bade33c38f18b35c03ae94cf336e17cf2944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 65cb1871a3e125355df78a6d1d6f1bc7e356c4e8 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sun, 5 Nov 2023 17:25:20 +0000
Subject: [PATCH 13/22] don't print empty error messages

this is part two of the quest to kill the prefix
error message. after i disabled prefix-related
messages, it still printed "error: ." on screen.

Signed-off-by: Leah Rowe <leah@libreboot.org>
---
 grub-core/kern/err.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/grub-core/kern/err.c b/grub-core/kern/err.c
index 53c734de7..7cac53983 100644
--- a/grub-core/kern/err.c
+++ b/grub-core/kern/err.c
@@ -107,7 +107,8 @@ grub_print_error (void)
     {
       if (grub_errno != GRUB_ERR_NONE)
 	{
-	  grub_err_printf (_("error: %s.\n"), grub_errmsg);
+          if (grub_strlen(grub_errmsg) > 0)
+	    grub_err_printf (_("error: %s.\n"), grub_errmsg);
 	  grub_err_printed_errors++;
 	}
     }
-- 
2.39.2