mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-23 17:57:45 +02:00
Ext4Pkg: Correct MSVC compilation
MaxExtentsPerNode should be same type as eh_max uint16, because maximum count of extent header entries is 65535 Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
parent
c0705373c2
commit
c23b214bad
@ -254,7 +254,7 @@ Ext4GetExtent (
|
|||||||
EXT4_EXTENT_HEADER *ExtHeader;
|
EXT4_EXTENT_HEADER *ExtHeader;
|
||||||
EXT4_EXTENT_INDEX *Index;
|
EXT4_EXTENT_INDEX *Index;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT32 MaxExtentsPerNode;
|
UINT16 MaxExtentsPerNode;
|
||||||
EXT4_BLOCK_NR BlockNumber;
|
EXT4_BLOCK_NR BlockNumber;
|
||||||
|
|
||||||
Inode = File->Inode;
|
Inode = File->Inode;
|
||||||
@ -302,7 +302,7 @@ Ext4GetExtent (
|
|||||||
// A single node fits into a single block, so we can only have (BlockSize / sizeof(EXT4_EXTENT)) - 1
|
// A single node fits into a single block, so we can only have (BlockSize / sizeof(EXT4_EXTENT)) - 1
|
||||||
// extents in a single node. Note the -1, because both leaf and internal node headers are 12 bytes,
|
// extents in a single node. Note the -1, because both leaf and internal node headers are 12 bytes,
|
||||||
// and so are individual entries.
|
// and so are individual entries.
|
||||||
MaxExtentsPerNode = (Partition->BlockSize / sizeof (EXT4_EXTENT)) - 1;
|
MaxExtentsPerNode = (UINT16)((Partition->BlockSize / sizeof (EXT4_EXTENT)) - 1);
|
||||||
|
|
||||||
while (ExtHeader->eh_depth != 0) {
|
while (ExtHeader->eh_depth != 0) {
|
||||||
CurrentDepth--;
|
CurrentDepth--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user