]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Dblk.c
ShellPkg: Update Debug1 profile commands response output
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Dblk.c
index 1c86f1df217b230c666cf8f07e280ea87e1f7c93..206be9b73684c456411745f4f603eb4fdff26ab6 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for Dblk shell Debug1 function.\r
 \r
+  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2005 - 2011, 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
@@ -74,7 +75,7 @@ DisplayTheBlocks(
 \r
     DumpHex(2,0,BufferSize,Buffer);\r
   } else {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_READ_FAIL), gShellDebug1HiiHandle, L"BlockIo", Status);\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"dblk", L"BlockIo");  \r
     ShellStatus = SHELL_DEVICE_ERROR;\r
   }\r
 \r
@@ -128,7 +129,7 @@ ShellCommandRunDblk (
   Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);\r
   if (EFI_ERROR(Status)) {\r
     if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, ProblemParam);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dblk", ProblemParam);  \r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -136,10 +137,10 @@ ShellCommandRunDblk (
     }\r
   } else {\r
     if (ShellCommandLineGetCount(Package) > 4) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dblk");  \r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else if (ShellCommandLineGetCount(Package) < 2) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"dblk");  \r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
       //\r
@@ -153,7 +154,7 @@ ShellCommandRunDblk (
         Lba = 0;\r
       } else {\r
         if (!ShellIsHexOrDecimalNumber(LbaString, TRUE, FALSE)) {\r
-          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, LbaString);\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", LbaString);  \r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         }\r
         ShellConvertStringToUint64(LbaString, &Lba, TRUE, FALSE);\r
@@ -163,14 +164,14 @@ ShellCommandRunDblk (
         BlockCount = 1;\r
       } else {\r
         if (!ShellIsHexOrDecimalNumber(BlockCountString, TRUE, FALSE)) {\r
-          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, BlockCountString);\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);  \r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         }\r
         ShellConvertStringToUint64(BlockCountString, &BlockCount, TRUE, FALSE);\r
         if (BlockCount > 0x10) {\r
           BlockCount = 0x10;\r
         } else if (BlockCount == 0) {\r
-          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, BlockCountString);\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);  \r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         }\r
       }\r
@@ -180,12 +181,12 @@ ShellCommandRunDblk (
         // do the work if we have a valid block identifier\r
         //\r
         if (gEfiShellProtocol->GetDevicePathFromMap(BlockName) == NULL) {\r
-          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, BlockName);\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockName);  \r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         } else {\r
           DevPath = (EFI_DEVICE_PATH_PROTOCOL*)gEfiShellProtocol->GetDevicePathFromMap(BlockName);\r
           if (gBS->LocateDevicePath(&gEfiBlockIoProtocolGuid, &DevPath, NULL) == EFI_NOT_FOUND) {\r
-            ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MAP_PROTOCOL), gShellDebug1HiiHandle, BlockName, L"BlockIo");\r
+            ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MAP_PROTOCOL), gShellDebug1HiiHandle, L"dblk", BlockName, L"BlockIo");  \r
             ShellStatus = SHELL_INVALID_PARAMETER;\r
           } else {\r
             ShellStatus = DisplayTheBlocks(gEfiShellProtocol->GetDevicePathFromMap(BlockName), Lba, (UINT8)BlockCount);\r