]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcDriver.c
index bc9dc914f3201996d3cb993f34b557b97f1d4121..3c1d400d502ca63a08d07cbb96f90c6198498658 100644 (file)
@@ -4,13 +4,7 @@
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \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
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -814,7 +808,7 @@ PxeBcCreateIp4Children (
     }\r
 \r
     //\r
-    // Open SNP on the child handle BY_DRIVER. It will prevent any additionally\r
+    // Open SNP on the child handle BY_DRIVER|EXCLUSIVE. It will prevent any additionally\r
     // layering to perform the experiment.\r
     //\r
     Status = gBS->OpenProtocol (\r
@@ -823,7 +817,7 @@ PxeBcCreateIp4Children (
                     (VOID **) &Snp,\r
                     This->DriverBindingHandle,\r
                     Private->Ip4Nic->Controller,\r
-                    EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                    EFI_OPEN_PROTOCOL_BY_DRIVER|EFI_OPEN_PROTOCOL_EXCLUSIVE\r
                     );\r
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
@@ -1157,7 +1151,7 @@ PxeBcCreateIp6Children (
     }\r
 \r
     //\r
-    // Open SNP on the child handle BY_DRIVER. It will prevent any additionally\r
+    // Open SNP on the child handle BY_DRIVER|EXCLUSIVE. It will prevent any additionally\r
     // layering to perform the experiment.\r
     //\r
     Status = gBS->OpenProtocol (\r
@@ -1166,7 +1160,7 @@ PxeBcCreateIp6Children (
                     (VOID **) &Snp,\r
                     This->DriverBindingHandle,\r
                     Private->Ip6Nic->Controller,\r
-                    EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                    EFI_OPEN_PROTOCOL_BY_DRIVER|EFI_OPEN_PROTOCOL_EXCLUSIVE\r
                     );\r
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
@@ -1269,16 +1263,11 @@ PxeBcDriverEntryPoint (
              &gPxeBcComponentName2\r
              );\r
   if (EFI_ERROR (Status)) {\r
-    gBS->UninstallMultipleProtocolInterfaces (\r
-           ImageHandle,\r
-           &gEfiDriverBindingProtocolGuid,\r
-           &gPxeBcIp4DriverBinding,\r
-           &gEfiComponentName2ProtocolGuid,\r
-           &gPxeBcComponentName2,\r
-           &gEfiComponentNameProtocolGuid,\r
-           &gPxeBcComponentName,\r
-           NULL\r
-           );\r
+    EfiLibUninstallDriverBindingComponentName2 (\r
+      &gPxeBcIp4DriverBinding,\r
+      &gPxeBcComponentName,\r
+      &gPxeBcComponentName2\r
+      );\r
   }\r
 \r
   return Status;\r