mirror of https://github.com/acidanthera/audk.git
Ext4Pkg: Fix GdtCsum calculation for block group descriptor
Doesn't take into account the empty checksum field and passes the correct initial value of 0xFFFF into the CRC16-ANSI function Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
parent
71cbd3cb57
commit
b84aa16df8
|
@ -169,14 +169,10 @@ Ext4CalculateBlockGroupDescChecksumGdtCsum (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT16 Csum;
|
UINT16 Csum;
|
||||||
UINT16 Dummy;
|
|
||||||
|
|
||||||
Dummy = 0;
|
Csum = CalculateCrc16Ansi (Partition->SuperBlock.s_uuid, sizeof (Partition->SuperBlock.s_uuid), 0xFFFF);
|
||||||
|
|
||||||
Csum = CalculateCrc16Ansi (Partition->SuperBlock.s_uuid, 16, 0);
|
|
||||||
Csum = CalculateCrc16Ansi (&BlockGroupNum, sizeof (BlockGroupNum), Csum);
|
Csum = CalculateCrc16Ansi (&BlockGroupNum, sizeof (BlockGroupNum), Csum);
|
||||||
Csum = CalculateCrc16Ansi (BlockGroupDesc, OFFSET_OF (EXT4_BLOCK_GROUP_DESC, bg_checksum), Csum);
|
Csum = CalculateCrc16Ansi (BlockGroupDesc, OFFSET_OF (EXT4_BLOCK_GROUP_DESC, bg_checksum), Csum);
|
||||||
Csum = CalculateCrc16Ansi (&Dummy, sizeof (Dummy), Csum);
|
|
||||||
Csum =
|
Csum =
|
||||||
CalculateCrc16Ansi (
|
CalculateCrc16Ansi (
|
||||||
&BlockGroupDesc->bg_block_bitmap_hi,
|
&BlockGroupDesc->bg_block_bitmap_hi,
|
||||||
|
|
Loading…
Reference in New Issue