From: Robbie Harwood Date: Fri, 15 Jul 2022 20:13:01 +0000 (-0400) Subject: kern/fs: The grub_fs_probe() should dprint errors from filesystems X-Git-Tag: grub-2.12-rc1~302 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92005be6d82b275e32bd74d1aabc45461e70db0d;p=thirdparty%2Fgrub.git kern/fs: The grub_fs_probe() should dprint errors from filesystems 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 Reviewed-by: Daniel Kiper --- diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c index e0d7e16a2..b9508296d 100644 --- a/grub-core/kern/fs.c +++ b/grub-core/kern/fs.c @@ -75,6 +75,8 @@ grub_fs_probe (grub_device_t device) return p; grub_error_push (); + /* The grub_error_push() does not touch grub_errmsg. */ + grub_dprintf ("fs", _("error: %s.\n"), grub_errmsg); grub_dprintf ("fs", "%s detection failed.\n", p->name); grub_error_pop ();