summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
index c1d44809bf..3174ab2b4b 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
@@ -48,11 +48,18 @@ FindAnchorVolumeDescriptorPointer (
)
{
EFI_STATUS Status;
- UINT32 BlockSize = BlockIo->Media->BlockSize;
- EFI_LBA EndLBA = BlockIo->Media->LastBlock;
- EFI_LBA DescriptorLBAs[] = { 256, EndLBA - 256, EndLBA, 512 };
+ UINT32 BlockSize;
+ EFI_LBA EndLBA;
+ EFI_LBA DescriptorLBAs[4];
UINTN Index;
+ BlockSize = BlockIo->Media->BlockSize;
+ EndLBA = BlockIo->Media->LastBlock;
+ DescriptorLBAs[0] = 256;
+ DescriptorLBAs[1] = EndLBA - 256;
+ DescriptorLBAs[2] = EndLBA;
+ DescriptorLBAs[3] = 512;
+
for (Index = 0; Index < ARRAY_SIZE (DescriptorLBAs); Index++) {
Status = DiskIo->ReadDisk (
DiskIo,