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.
This commit is contained in:
Mike Beaton 2025-10-12 11:42:27 +01:00 committed by GitHub
parent c85c584c66
commit 4f8ce12f1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}