summaryrefslogtreecommitdiff
path: root/Nt32Pkg/WinNtBlockIoDxe
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-19 04:13:25 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-19 04:13:25 +0000
commitadc863cbd42c24c6f32597915cb8a5329e0806ce (patch)
tree40afb27f71235e0350c60b65db09e8ad9311000a /Nt32Pkg/WinNtBlockIoDxe
parentc7b616cf0953eb1a0eede7edbf863fbb833f1a93 (diff)
downloadedk2-platforms-adc863cbd42c24c6f32597915cb8a5329e0806ce.tar.xz
Add checking for ChildHandle.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4701 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/WinNtBlockIoDxe')
-rw-r--r--Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c b/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c
index 1060d46001..fb162aa30d 100644
--- a/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c
+++ b/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c
@@ -185,6 +185,13 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
}
//
+ // This is a device driver, so ChildHandle must be NULL.
+ //
+ if (ChildHandle != NULL) {
+ return EFI_UNSUPPORTED;
+ }
+
+ //
// Validate controller handle
//
Status = gBS->OpenProtocol (
@@ -207,6 +214,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
return EFI_UNSUPPORTED;
}
+
if (Status == EFI_UNSUPPORTED) {
return Status;
} else if (Status != EFI_ALREADY_STARTED) {