/** @file\r
Utility functions used by the Dp application.\r
\r
- Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.\r
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.\r
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
CHAR8 *PlatformLanguage;\r
EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2;\r
\r
+ Image = NULL;\r
+ LoadedImageDevicePath = NULL;\r
+ DevicePath = NULL;\r
+\r
//\r
// Method 1: Get the name string from image PDB\r
//\r
);\r
if (!EFI_ERROR (Status) && (LoadedImageDevicePath != NULL)) {\r
DevicePath = LoadedImageDevicePath;\r
+ } else if (Image != NULL) {\r
+ DevicePath = Image->FilePath;\r
+ }\r
\r
+ if (DevicePath != NULL) {\r
//\r
- // Try to get image GUID from LoadedImageDevicePath protocol\r
+ // Try to get image GUID from image DevicePath\r
//\r
NameGuid = NULL;\r
while (!IsDevicePathEndType (DevicePath)) {\r
//\r
// Method 5: Get the name string from image DevicePath\r
//\r
- NameString = ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);\r
+ NameString = ConvertDevicePathToText (DevicePath, TRUE, FALSE);\r
if (NameString != NULL) {\r
StrnCpyS (mGaugeString, DP_GAUGE_STRING_LENGTH + 1, NameString, DP_GAUGE_STRING_LENGTH);\r
mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;\r