]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c
Clean up DEC files:
[mirror_edk2.git] / Nt32Pkg / WinNtBlockIoDxe / DriverDiagnostics.c
index 1060d46001140b3262ea50bd97a27e448258ef03..69a8f100516b1086a4d9f1bd3ed028fc9c2dba46 100644 (file)
@@ -1,7 +1,7 @@
-/*++\r
+/**@file\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -15,7 +15,7 @@ Module Name:
 \r
 Abstract:\r
 \r
---*/\r
+**/\r
 #include <Uefi.h>\r
 #include <WinNtDxe.h>\r
 #include <Protocol/BlockIo.h>\r
@@ -184,13 +184,20 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
+  //\r
+  // This is a device driver, so ChildHandle must be NULL.\r
+  //\r
+  if (ChildHandle != NULL) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   //\r
   // Validate controller handle\r
   //\r
   Status = gBS->OpenProtocol (\r
                   ControllerHandle,\r
                   &gEfiWinNtIoProtocolGuid,\r
-                  &BlockIo,\r
+                  (VOID **) &BlockIo,\r
                   gWinNtBlockIoDriverBinding.DriverBindingHandle,\r
                   ControllerHandle,\r
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
@@ -207,6 +214,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
     return EFI_UNSUPPORTED;\r
   }\r
 \r
+  \r
   if (Status == EFI_UNSUPPORTED) {\r
     return Status;\r
   } else if (Status != EFI_ALREADY_STARTED) {\r