]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Mode.c
ShellPkg: Update header file including style
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Mode.c
index 53ba0b6cd483d9384db9efe586f13a96a09fa091..7696e3fbbd2a00ee10227740d69fb26536d9ac43 100644 (file)
@@ -1,8 +1,9 @@
 /** @file\r
   Main file for Mode shell Debug1 function.\r
 \r
-  Copyright (c) 2010, 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
 \r
 #include "UefiShellDebug1CommandsLib.h"\r
 \r
+/**\r
+  Function for 'mode' command.\r
+\r
+  @param[in] ImageHandle  Handle to the Image (NULL if Internal).\r
+  @param[in] SystemTable  Pointer to the System Table (NULL if Internal).\r
+**/\r
 SHELL_STATUS\r
 EFIAPI\r
 ShellCommandRunMode (\r
@@ -51,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
@@ -59,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
@@ -86,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
@@ -97,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