summaryrefslogtreecommitdiff
path: root/config/grub
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-11-05 21:59:52 +0000
committerLeah Rowe <leah@libreboot.org>2023-11-05 21:59:52 +0000
commit80b70d899c0fc5c8d4b5301f67527907e2a76947 (patch)
tree57ed0216aa11d6aba795ba460c515f7bb0dc94f0 /config/grub
parent6e60bfe0b0fe1b9989870ba1f2160e178fcba7a6 (diff)
grub: avoid printing empty error messages
this replaces the previous behaviour, which erred on a specific value of grub_errno, which was a problem if other types of errors used that value. due to the way i patch out the prefix error messages, this new patch ensures that only those errors are silenced. all other messages will be printed. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/grub')
-rw-r--r--config/grub/patches/0004-prefix/0003-don-t-print-empty-error-messages.patch (renamed from config/grub/patches/0004-prefix/0003-don-t-print-errors-if-GRUB_ERR_FILE_NOT_FOUND.patch)8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/grub/patches/0004-prefix/0003-don-t-print-errors-if-GRUB_ERR_FILE_NOT_FOUND.patch b/config/grub/patches/0004-prefix/0003-don-t-print-empty-error-messages.patch
index 5ecae825..25221c9c 100644
--- a/config/grub/patches/0004-prefix/0003-don-t-print-errors-if-GRUB_ERR_FILE_NOT_FOUND.patch
+++ b/config/grub/patches/0004-prefix/0003-don-t-print-empty-error-messages.patch
@@ -1,7 +1,7 @@
-From f80b344cd3ebd098ba6e63aa1ee97a6223ffe7f0 Mon Sep 17 00:00:00 2001
+From e5b7ec81421487e71bcaf8b6b5a27f3649a62753 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sun, 5 Nov 2023 17:25:20 +0000
-Subject: [PATCH 1/1] don't print errors if GRUB_ERR_FILE_NOT_FOUND
+Subject: [PATCH 1/1] don't print empty error messages
this is part two of the quest to kill the prefix
error message. after i disabled prefix-related
@@ -13,7 +13,7 @@ Signed-off-by: Leah Rowe <leah@libreboot.org>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/grub-core/kern/err.c b/grub-core/kern/err.c
-index 53c734de7..c9488b748 100644
+index 53c734de7..7cac53983 100644
--- a/grub-core/kern/err.c
+++ b/grub-core/kern/err.c
@@ -107,7 +107,8 @@ grub_print_error (void)
@@ -21,7 +21,7 @@ index 53c734de7..c9488b748 100644
if (grub_errno != GRUB_ERR_NONE)
{
- grub_err_printf (_("error: %s.\n"), grub_errmsg);
-+ if (grub_errno != GRUB_ERR_FILE_NOT_FOUND)
++ if (grub_strlen(grub_errmsg) > 0)
+ grub_err_printf (_("error: %s.\n"), grub_errmsg);
grub_err_printed_errors++;
}