]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Mode.c
ShellPkg: Fix unexpected behavior of mouse cursor in Editor.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Mode.c
index d2b67d5760aaf342cda74fd510b104f5bce4dd05..7696e3fbbd2a00ee10227740d69fb26536d9ac43 100644 (file)
@@ -1,8 +1,9 @@
 /** @file\r
   Main file for Mode shell Debug1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
-  This program and the acModeanying materials\r
+  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
+  Copyright (c) 2010 - 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 acModeanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -57,7 +58,7 @@ ShellCommandRunMode (
   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"mode", ProblemParam);  \r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -65,21 +66,21 @@ ShellCommandRunMode (
     }\r
   } else {\r
     if (ShellCommandLineGetCount(Package) > 3) {\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"mode");  \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"mode");  \r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else if (ShellCommandLineGetCount(Package) == 3) {\r
       Temp = ShellCommandLineGetRawValue(Package, 1);\r
       if (!ShellIsHexOrDecimalNumber(Temp, FALSE, FALSE)) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Temp);\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);  \r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       }\r
       NewCol = ShellStrToUintn(Temp);\r
       Temp = ShellCommandLineGetRawValue(Package, 2);\r
       if (!ShellIsHexOrDecimalNumber(Temp, FALSE, FALSE)) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Temp);\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);  \r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       }\r
       NewRow = ShellStrToUintn(Temp);\r
@@ -92,7 +93,7 @@ ShellCommandRunMode (
         if (Col == NewCol && Row == NewRow) {\r
           Status = gST->ConOut->SetMode(gST->ConOut, LoopVar);\r
           if (EFI_ERROR(Status)) {\r
-            ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_SET_FAIL), gShellDebug1HiiHandle, Status);\r
+            ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_SET_FAIL), gShellDebug1HiiHandle, L"mode");  \r
             ShellStatus = SHELL_DEVICE_ERROR;\r
           } else {\r
             // worked fine...\r
@@ -103,7 +104,7 @@ ShellCommandRunMode (
       }\r
 \r
       if (!Done) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_NO_MATCH), gShellDebug1HiiHandle);\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_NO_MATCH), gShellDebug1HiiHandle, L"mode");  \r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       }\r
 \r