Fixed the bug that not to stop PXE functionality when PXE meeting some failure. And enhanced DriverBindingStop() to stop PXE functionality if PXE was still alive.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9478 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2009-11-25 01:36:54 +00:00
parent 441ff98cba
commit 8f8bfa5b85
2 changed files with 10 additions and 0 deletions

View File

@ -535,6 +535,14 @@ PxeBcDriverBindingStop (
return Status; return Status;
} }
//
// Stop functionality of PXE Base Code protocol
//
Status = PxeBc->Stop (PxeBc);
if (Status != EFI_SUCCESS && Status != EFI_NOT_STARTED) {
return Status;
}
Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (PxeBc); Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (PxeBc);
Status = gBS->UninstallMultipleProtocolInterfaces ( Status = gBS->UninstallMultipleProtocolInterfaces (

View File

@ -2697,12 +2697,14 @@ EfiPxeLoadFile (
// Check download status // Check download status
// //
if (Status == EFI_SUCCESS) { if (Status == EFI_SUCCESS) {
PxeBc->Stop (PxeBc);
return EFI_SUCCESS; return EFI_SUCCESS;
} else if (Status == EFI_BUFFER_TOO_SMALL) { } else if (Status == EFI_BUFFER_TOO_SMALL) {
if (Buffer != NULL) { if (Buffer != NULL) {
AsciiPrint ("PXE-E05: Download buffer is smaller than requested file.\n"); AsciiPrint ("PXE-E05: Download buffer is smaller than requested file.\n");
} else { } else {
PxeBc->Stop (PxeBc);
return Status; return Status;
} }