ShellPkg/DP: Update the error message info
authorDandan Bi <dandan.bi@intel.com>
Fri, 9 Feb 2018 03:10:12 +0000 (11:10 +0800)
committerLiming Gao <liming.gao@intel.com>
Fri, 9 Feb 2018 09:04:16 +0000 (17:04 +0800)
Make the error message clearer if fail to get ACPI/FPDT table.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni

index 4dd7dd9ed11e360d0758761abbe319c7f04f3f62..aa9c2cdf7a83b5a82bcf85c0b62f78ee112463d1 100644 (file)
@@ -258,6 +258,7 @@ GetBootPerformanceTable (
                  );\r
   }\r
   if (EFI_ERROR(Status) || AcpiTable == NULL) {\r
+    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_GET_ACPI_TABLE_FAIL), mDpHiiHandle);\r
     return Status;\r
   }\r
 \r
@@ -266,6 +267,7 @@ GetBootPerformanceTable (
                       EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_SIGNATURE\r
                       );\r
   if (FirmwarePerformanceTable == NULL) {\r
+    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_GET_ACPI_FPDT_FAIL), mDpHiiHandle);\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
@@ -739,7 +741,6 @@ RunDp (
   //\r
   Status = GetBootPerformanceTable ();\r
   if (EFI_ERROR(Status)) {\r
-    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_GET_BOOT_PERFORMANCE_TABLE_FAIL), mDpHiiHandle);\r
     return Status;\r
   }\r
 \r
index b6069ae649b362575fb58fe40c6b129f23f8b3d8..c7eb0fbd71e3194f6a0e06d266f56121d42ad1fd 100644 (file)
@@ -90,7 +90,8 @@
 #string STR_DP_INCOMPLETE              #language en-US  " I "\r
 #string STR_DP_COMPLETE                #language en-US  "   "\r
 #string STR_ALIT_UNKNOWN               #language en-US  "Unknown"\r
-#string STR_DP_GET_BOOT_PERFORMANCE_TABLE_FAIL          #language en-US  "Fail to get boot performance table\n"\r
+#string STR_DP_GET_ACPI_TABLE_FAIL     #language en-US  "Fail to get ACPI Table\n"\r
+#string STR_DP_GET_ACPI_FPDT_FAIL      #language en-US  "Fail to get Firmware Performance Data Table (FPDT) in ACPI Table\n"\r
 \r
 #string STR_GET_HELP_DP         #language en-US ""\r
 ".TH dp 0 "Display performance metrics"\r\n"\r