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:
qhuang8 2007-03-16 09:24:10 +00:00
parent bb60dd97af
commit 3c17ed18fa

View File

@ -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
// //