mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
Fix a critical bug: When reading block succeeds but detecting MBR fails, it should return error code instead of EFI_SUCCESS.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2483 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
bb60dd97af
commit
3c17ed18fa
@ -162,10 +162,13 @@ Returns:
|
|||||||
BlockIo->Media->BlockSize,
|
BlockIo->Media->BlockSize,
|
||||||
Mbr
|
Mbr
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status) || !PartitionValidMbr (Mbr, BlockIo->Media->LastBlock)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Found = Status;
|
Found = Status;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
if (!PartitionValidMbr (Mbr, BlockIo->Media->LastBlock)) {
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// We have a valid mbr - add each partition
|
// We have a valid mbr - add each partition
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user