Add checking for ChildHandle.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4701 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2008-02-19 04:13:25 +00:00
parent c7b616cf09
commit adc863cbd4
1 changed files with 8 additions and 0 deletions

View File

@ -184,6 +184,13 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
return EFI_DEVICE_ERROR;
}
//
// This is a device driver, so ChildHandle must be NULL.
//
if (ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
//
// Validate controller handle
//
@ -207,6 +214,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
return EFI_UNSUPPORTED;
}
if (Status == EFI_UNSUPPORTED) {
return Status;
} else if (Status != EFI_ALREADY_STARTED) {