]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UserProfileManagerDxe/ModifyAccessPolicy.c
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToTe...
[mirror_edk2.git] / SecurityPkg / UserIdentification / UserProfileManagerDxe / ModifyAccessPolicy.c
index d73f77eeec970fa87adb7dde444209b3ed4c6b92..5b4171ddec1bca10281c91aadbbfab550827b6d8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The functions for access policy modification.\r
     \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2013, 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
@@ -229,24 +229,10 @@ AddDevicePath (
   IN     VOID                                   *OpCodeHandle\r
   )\r
 {\r
-  EFI_STATUS                        Status;\r
   EFI_DEVICE_PATH_PROTOCOL          *Next;\r
   EFI_STRING_ID                     NameID;\r
   EFI_STRING                        DriverName;\r
-  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathText;\r
 \r
-  //\r
-  // Locate device path to text protocol.\r
-  //\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiDevicePathToTextProtocolGuid,\r
-                  NULL,\r
-                  (VOID **) &DevicePathText\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return ;\r
-  }\r
-  \r
   //\r
   // Get driver file name node.\r
   //\r
@@ -259,7 +245,7 @@ AddDevicePath (
   //\r
   // Display the device path in form.\r
   //\r
-  DriverName = DevicePathText->ConvertDevicePathToText (DevicePath, FALSE, FALSE);\r
+  DriverName = ConvertDevicePathToText (DevicePath, FALSE, FALSE);\r
   NameID = HiiSetString (mCallbackInfo->HiiHandle, 0, DriverName, NULL);\r
   FreePool (DriverName);\r
   if (NameID == 0) {\r
@@ -410,7 +396,7 @@ DisplayLoadPermit(
     // Get driver device path.\r
     //\r
     UnicodeSPrint (VarName, sizeof (VarName), L"Driver%04x", Order[Index]);\r
-    Var = GetEfiGlobalVariable (VarName);\r
+    GetEfiGlobalVariable2 (VarName, (VOID**)&Var, NULL);\r
     if (Var == NULL) {\r
       continue;\r
     }\r
@@ -655,7 +641,7 @@ AddToForbidLoad (
   // Get loadable driver device path.\r
   //\r
   UnicodeSPrint  (VarName, sizeof (VarName), L"Driver%04x", DriverIndex);\r
-  Var = GetEfiGlobalVariable (VarName);\r
+  GetEfiGlobalVariable2 (VarName, (VOID**)&Var, NULL);\r
   if (Var == NULL) {\r
     return;\r
   }\r