summaryrefslogtreecommitdiffstats
path: root/FatPkg
diff options
context:
space:
mode:
authorFeng Tian <feng.tian@intel.com>2015-05-21 07:07:38 +0000
committerJordan Justen <jordan.l.justen@intel.com>2016-04-06 23:22:43 -0700
commit4819b3e8f01e8d61ba5310d9de6ce71598d5b54c (patch)
treeada098c385ed6a00e789d39a8827b6b0f262c664 /FatPkg
parent8a467be153517b5338fb5bfdcbdbe0931b198854 (diff)
downloadedk2-4819b3e8f01e8d61ba5310d9de6ce71598d5b54c.tar.gz
edk2-4819b3e8f01e8d61ba5310d9de6ce71598d5b54c.tar.bz2
edk2-4819b3e8f01e8d61ba5310d9de6ce71598d5b54c.zip
FatPkg/FatPei: Fix build error
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> (based on FatPkg commit c20b33e706e0ce7ffd395dd5c48a13aa24ca77fb) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg')
-rw-r--r--FatPkg/FatPei/FatLiteApi.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/FatPkg/FatPei/FatLiteApi.c b/FatPkg/FatPei/FatLiteApi.c
index e63f1f5466..d96774e4a2 100644
--- a/FatPkg/FatPei/FatLiteApi.c
+++ b/FatPkg/FatPei/FatLiteApi.c
@@ -69,7 +69,8 @@ UpdateBlocksAndVolumes (
EFI_PEI_SERVICES **PeiServices;
PeiServices = (EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
-
+ BlockIo2Ppi = NULL;
+ BlockIoPpi = NULL;
//
// Clean up caches
//
@@ -135,6 +136,10 @@ UpdateBlocksAndVolumes (
if (EFI_ERROR (Status) || !Media2.MediaPresent) {
continue;
}
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockIo2 = BlockIo2Ppi;
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].InterfaceType = Media2.InterfaceType;
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].LastBlock = Media2.LastBlock;
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockSize = Media2.BlockSize;
} else {
Status = BlockIoPpi->GetBlockDeviceMediaInfo (
PeiServices,
@@ -145,9 +150,13 @@ UpdateBlocksAndVolumes (
if (EFI_ERROR (Status) || !Media.MediaPresent) {
continue;
}
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockIo = BlockIoPpi;
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].DevType = Media.DeviceType;
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].LastBlock = Media.LastBlock;
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockSize = (UINT32) Media.BlockSize;
}
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].IoAlign = 0;
+ PrivateData->BlockDevice[PrivateData->BlockDeviceCount].IoAlign = 0;
//
// Not used here
//
@@ -155,17 +164,6 @@ UpdateBlocksAndVolumes (
PrivateData->BlockDevice[PrivateData->BlockDeviceCount].PartitionChecked = FALSE;
PrivateData->BlockDevice[PrivateData->BlockDeviceCount].PhysicalDevNo = (UINT8) Index;
- if (BlockIo2) {
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockIo2 = BlockIo2Ppi;
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].InterfaceType = Media2.InterfaceType;
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].LastBlock = Media2.LastBlock;
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockSize = Media2.BlockSize;
- } else {
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockIo = BlockIoPpi;
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].DevType = Media.DeviceType;
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].LastBlock = Media.LastBlock;
- PrivateData->BlockDevice[PrivateData->BlockDeviceCount].BlockSize = (UINT32) Media.BlockSize;
- }
PrivateData->BlockDeviceCount++;
}
}