]> TLD Linux GIT Repositories - packages/grub2.git/blob - 0268-grub_fs_probe-dprint-errors-from-filesystems.patch
- fix for ext4 fs with metadata_csum_seed
[packages/grub2.git] / 0268-grub_fs_probe-dprint-errors-from-filesystems.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Robbie Harwood <rharwood@redhat.com>
3 Date: Fri, 15 Jul 2022 15:39:41 -0400
4 Subject: [PATCH] grub_fs_probe(): dprint errors from filesystems
5
6 When filesystem detection fails, all that's currently debug-logged is a
7 series of messages like:
8
9     grub-core/kern/fs.c:56:fs: Detecting ntfs...
10     grub-core/kern/fs.c:76:fs: ntfs detection failed.
11
12 repeated for each filesystem.  Any messages provided to grub_error() by
13 the filesystem are lost, and one has to break out gdb to figure out what
14 went wrong.
15
16 With this change, one instead sees:
17
18     grub-core/kern/fs.c:56:fs: Detecting fat...
19     grub-core/osdep/hostdisk.c:357:hostdisk: reusing open device
20     `/path/to/device'
21     grub-core/kern/fs.c:77:fs: error: invalid modification timestamp for /.
22     grub-core/kern/fs.c:79:fs: fat detection failed.
23
24 in the debug prints.
25
26 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
27 (cherry picked from commit 838c79d658797d0662ee7f9e033e38ee88059e02)
28 ---
29  grub-core/kern/fs.c | 1 +
30  1 file changed, 1 insertion(+)
31
32 diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c
33 index c698295bcb..b58e2ae1d2 100644
34 --- a/grub-core/kern/fs.c
35 +++ b/grub-core/kern/fs.c
36 @@ -74,6 +74,7 @@ grub_fs_probe (grub_device_t device)
37           if (grub_errno == GRUB_ERR_NONE)
38             return p;
39  
40 +         grub_dprintf ("fs", _("error: %s.\n"), grub_errmsg);
41           grub_error_push ();
42           grub_dprintf ("fs", "%s detection failed.\n", p->name);
43           grub_error_pop ();