|
|
fd0330 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
fd0330 |
From: Robbie Harwood <rharwood@redhat.com>
|
|
|
fd0330 |
Date: Fri, 15 Jul 2022 15:39:41 -0400
|
|
|
fd0330 |
Subject: [PATCH] grub_fs_probe(): dprint errors from filesystems
|
|
|
fd0330 |
|
|
|
fd0330 |
When filesystem detection fails, all that's currently debug-logged is a
|
|
|
fd0330 |
series of messages like:
|
|
|
fd0330 |
|
|
|
fd0330 |
grub-core/kern/fs.c:56:fs: Detecting ntfs...
|
|
|
fd0330 |
grub-core/kern/fs.c:76:fs: ntfs detection failed.
|
|
|
fd0330 |
|
|
|
fd0330 |
repeated for each filesystem. Any messages provided to grub_error() by
|
|
|
fd0330 |
the filesystem are lost, and one has to break out gdb to figure out what
|
|
|
fd0330 |
went wrong.
|
|
|
fd0330 |
|
|
|
fd0330 |
With this change, one instead sees:
|
|
|
fd0330 |
|
|
|
fd0330 |
grub-core/kern/fs.c:56:fs: Detecting fat...
|
|
|
fd0330 |
grub-core/osdep/hostdisk.c:357:hostdisk: reusing open device
|
|
|
fd0330 |
`/path/to/device'
|
|
|
fd0330 |
grub-core/kern/fs.c:77:fs: error: invalid modification timestamp for /.
|
|
|
fd0330 |
grub-core/kern/fs.c:79:fs: fat detection failed.
|
|
|
fd0330 |
|
|
|
fd0330 |
in the debug prints.
|
|
|
fd0330 |
|
|
|
fd0330 |
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
|
|
fd0330 |
(cherry picked from commit 838c79d658797d0662ee7f9e033e38ee88059e02)
|
|
|
fd0330 |
---
|
|
|
fd0330 |
grub-core/kern/fs.c | 1 +
|
|
|
fd0330 |
1 file changed, 1 insertion(+)
|
|
|
fd0330 |
|
|
|
fd0330 |
diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c
|
|
|
fd0330 |
index c698295bcb..b58e2ae1d2 100644
|
|
|
fd0330 |
--- a/grub-core/kern/fs.c
|
|
|
fd0330 |
+++ b/grub-core/kern/fs.c
|
|
|
fd0330 |
@@ -74,6 +74,7 @@ grub_fs_probe (grub_device_t device)
|
|
|
fd0330 |
if (grub_errno == GRUB_ERR_NONE)
|
|
|
fd0330 |
return p;
|
|
|
fd0330 |
|
|
|
fd0330 |
+ grub_dprintf ("fs", _("error: %s.\n"), grub_errmsg);
|
|
|
fd0330 |
grub_error_push ();
|
|
|
fd0330 |
grub_dprintf ("fs", "%s detection failed.\n", p->name);
|
|
|
fd0330 |
grub_error_pop ();
|