/** @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
//\r
// Save access policy.\r
//\r
- if (mUserInfo.AccessPolicyModified && (mUserInfo.AccessPolicyLen > 0)) {\r
+ if (mUserInfo.AccessPolicyModified && (mUserInfo.AccessPolicyLen > 0) && (mUserInfo.AccessPolicy != NULL)) {\r
Info = AllocateZeroPool (sizeof (EFI_USER_INFO) + mUserInfo.AccessPolicyLen);\r
if (Info == NULL) {\r
return ;\r
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
//\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
// 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
// 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