From 4f8ce12f1ef10c7fe431c3391f5dd39c9486f33c Mon Sep 17 00:00:00 2001 From: Mike Beaton Date: Sun, 12 Oct 2025 11:42:27 +0100 Subject: [PATCH] Ext4Dxe: Convert DEBUG_WARN to DEBUG_INFO (#81) The issues which are warned about can happen as a normal part of life when using Linux, especially `Needs journal recovery, mounting read-only`. This means that when using Ext4Dxe with OpenCore it becomes necessary not to include WARN in HaltLevel, whereas in general, to keep a clean system, one might want to include it. More generally this PR tries to reflect the idea that WARNs should be to let users know of config (and other) errors which they should really fix. Whereas here we have a state which occurs quite commonly and which the user can do nothing about. I am pretty certain that (from the point of view described above) the changes in Superblock.c are correct. I am less certain about the changes in Symlink.c - but all the same, if they are not errors and the system can continue, and the user can do nothing about it, then probably the same logic applies. --- Ext4Pkg/Ext4Dxe/Superblock.c | 6 +++--- Ext4Pkg/Ext4Dxe/Symlink.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Ext4Pkg/Ext4Dxe/Superblock.c b/Ext4Pkg/Ext4Dxe/Superblock.c index 604925b582..5bdd1e3c0e 100644 --- a/Ext4Pkg/Ext4Dxe/Superblock.c +++ b/Ext4Pkg/Ext4Dxe/Superblock.c @@ -90,7 +90,7 @@ Ext4SuperblockValidate ( } if ((Sb->s_state & EXT4_FS_STATE_UNMOUNTED) == 0) { - DEBUG ((DEBUG_WARN, "[ext4] Filesystem was not unmounted cleanly\n")); + DEBUG ((DEBUG_INFO, "[ext4] Filesystem was not unmounted cleanly\n")); } return TRUE; @@ -215,7 +215,7 @@ Ext4OpenSuperblock ( } if (EXT4_HAS_INCOMPAT (Partition, EXT4_FEATURE_INCOMPAT_RECOVER)) { - DEBUG ((DEBUG_WARN, "[ext4] Needs journal recovery, mounting read-only\n")); + DEBUG ((DEBUG_INFO, "[ext4] Needs journal recovery, mounting read-only\n")); Partition->ReadOnly = TRUE; } @@ -233,7 +233,7 @@ Ext4OpenSuperblock ( UnsupportedRoCompat = Partition->FeaturesRoCompat & ~gSupportedRoCompatFeat; if (UnsupportedRoCompat != 0) { - DEBUG ((DEBUG_WARN, "[ext4] Unsupported ro compat %x\n", UnsupportedRoCompat)); + DEBUG ((DEBUG_INFO, "[ext4] Unsupported ro compat %x\n", UnsupportedRoCompat)); Partition->ReadOnly = TRUE; } diff --git a/Ext4Pkg/Ext4Dxe/Symlink.c b/Ext4Pkg/Ext4Dxe/Symlink.c index d80cb9fff9..5ff37734ba 100644 --- a/Ext4Pkg/Ext4Dxe/Symlink.c +++ b/Ext4Pkg/Ext4Dxe/Symlink.c @@ -133,7 +133,7 @@ Ext4ReadSlowSymlink ( // if (SymlinkSizeTmp >= EXT4_EFI_PATH_MAX) { DEBUG (( - DEBUG_WARN, + DEBUG_INFO, "[ext4] Warn: symlink path maximum length was hit!\n" )); return EFI_INVALID_PARAMETER; @@ -206,7 +206,7 @@ Ext4ReadSymlink ( // Skip reading, just check encryption flag // if ((File->Inode->i_flags & EXT4_ENCRYPT_FL) != 0) { - DEBUG ((DEBUG_WARN, "[ext4] Warn: symlink is encrypted\n")); + DEBUG ((DEBUG_INFO, "[ext4] Warn: symlink is encrypted\n")); return EFI_ACCESS_DENIED; }