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