mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-25 10:47:47 +02:00
Ext4Pkg: Fix incorrect checksum metadata feature check
Missing comparison != 0 leads to broken logic condition. Also replaced CSUM_SEED feature_incompat check with predefined macro EXT4_HAS_INCOMPAT Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
parent
7413548584
commit
2d406aacfb
@ -220,13 +220,11 @@ Ext4OpenSuperblock (
|
||||
}
|
||||
|
||||
// At the time of writing, it's the only supported checksum.
|
||||
if (Partition->FeaturesCompat & EXT4_FEATURE_RO_COMPAT_METADATA_CSUM &&
|
||||
(Sb->s_checksum_type != EXT4_CHECKSUM_CRC32C))
|
||||
{
|
||||
if (EXT4_HAS_METADATA_CSUM (Partition) && (Sb->s_checksum_type != EXT4_CHECKSUM_CRC32C)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if ((Partition->FeaturesIncompat & EXT4_FEATURE_INCOMPAT_CSUM_SEED) != 0) {
|
||||
if (EXT4_HAS_INCOMPAT (Partition, EXT4_FEATURE_INCOMPAT_CSUM_SEED)) {
|
||||
Partition->InitialSeed = Sb->s_checksum_seed;
|
||||
} else {
|
||||
Partition->InitialSeed = Ext4CalculateChecksum (Partition, Sb->s_uuid, 16, ~0U);
|
||||
|
Loading…
x
Reference in New Issue
Block a user