Skip to content

Commit

Permalink
Revert FvHandle check in DxeServicesLib to align with TianoCore since…
Browse files Browse the repository at this point in the history
… it is now fixed upstream. (#10)
  • Loading branch information
spbrogan authored and Bret Barkelew committed Jan 21, 2019
1 parent eb22d01 commit b9e24e2
Showing 1 changed file with 25 additions and 41 deletions.
66 changes: 25 additions & 41 deletions MdePkg/Library/DxeServicesLib/DxeServicesLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,19 +395,17 @@ GetSectionFromAnyFv (
// will locate the FFS faster.
//
FvHandle = InternalImageHandleToFvHandle (gImageHandle);
if (NULL != FvHandle) { // MS_CHANGE
Status = InternalGetSectionFromFv(
FvHandle,
NameGuid,
SectionType,
SectionInstance,
Buffer,
Size
);
if (!EFI_ERROR (Status)) {
return EFI_SUCCESS;
}
} // MS_CHANGE
Status = InternalGetSectionFromFv (
FvHandle,
NameGuid,
SectionType,
SectionInstance,
Buffer,
Size
);
if (!EFI_ERROR (Status)) {
return EFI_SUCCESS;
}

HandleBuffer = NULL;
Status = gBS->LocateHandleBuffer (
Expand Down Expand Up @@ -510,14 +508,8 @@ GetSectionFromFv (
OUT UINTN *Size
)
{
EFI_HANDLE FvHandle; // MS_CHANGE

FvHandle = InternalImageHandleToFvHandle(gImageHandle); // MS_CHANGE
if (NULL == FvHandle) { // MS_CHANGE
return EFI_NOT_FOUND; // MS_CHANGE
} // MS_CHANGE
return InternalGetSectionFromFv(
FvHandle, // MS_CHANGE
return InternalGetSectionFromFv (
InternalImageHandleToFvHandle(gImageHandle),
NameGuid,
SectionType,
SectionInstance,
Expand Down Expand Up @@ -578,14 +570,8 @@ GetSectionFromFfs (
OUT UINTN *Size
)
{
EFI_HANDLE FvHandle; //mschange

FvHandle = InternalImageHandleToFvHandle(gImageHandle); //mschange
if (NULL == FvHandle) { //mschange
return EFI_NOT_FOUND; //mschange
} //mschange
return InternalGetSectionFromFv(
FvHandle, //mschange
InternalImageHandleToFvHandle(gImageHandle),
&gEfiCallerIdGuid,
SectionType,
SectionInstance,
Expand Down Expand Up @@ -1022,19 +1008,17 @@ GetFileDevicePathFromAnyFv (
// will locate the FFS faster.
//
FvHandle = InternalImageHandleToFvHandle (gImageHandle);
if (FvHandle != NULL) { // MS_CHANGE
Status = InternalGetSectionFromFv(
FvHandle,
NameGuid,
SectionType,
SectionInstance,
&Buffer,
&Size
);
if (!EFI_ERROR (Status)) {
goto Done;
}
} // MS_CHANGE
Status = InternalGetSectionFromFv (
FvHandle,
NameGuid,
SectionType,
SectionInstance,
&Buffer,
&Size
);
if (!EFI_ERROR (Status)) {
goto Done;
}

Status = gBS->LocateHandleBuffer (
ByProtocol,
Expand Down

0 comments on commit b9e24e2

Please sign in to comment.