- if (!EFI_ERROR(Status) && DataBuffer != NULL) {\r
- RetString = GetAttrType(Atts);\r
- ShellPrintHiiEx(\r
- -1,\r
- -1,\r
- NULL,\r
- STRING_TOKEN(STR_DMPSTORE_HEADER_LINE),\r
- gShellDebug1HiiHandle,\r
- RetString,\r
- &FoundVarGuid,\r
- FoundVarName,\r
- DataSize);\r
- if (Type == DmpStoreDisplay) {\r
- DumpHex(2, 0, DataSize, DataBuffer);\r
+ if (Type == DmpStoreDisplay) {\r
+ if (!EFI_ERROR(Status) && (DataBuffer != NULL) && (FoundVarName != NULL)) {\r
+ AttrString = GetAttrType(Atts);\r
+ if (StandardFormatOutput) {\r
+ HexString = AllocatePool ((DataSize * 2 + 1) * sizeof (CHAR16));\r
+ if (HexString != NULL) {\r
+ ShellPrintHiiEx (\r
+ -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_VAR_SFO), gShellDebug1HiiHandle,\r
+ FoundVarName, &FoundVarGuid, Atts, DataSize,\r
+ BinaryToHexString (\r
+ DataBuffer, DataSize, HexString, (DataSize * 2 + 1) * sizeof (CHAR16)\r
+ )\r
+ );\r
+ FreePool (HexString);\r
+ } else {\r
+ Status = EFI_OUT_OF_RESOURCES;\r
+ }\r