]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Update Level1 profile commands response output
authorTapan Shah <tapandshah@hp.com>
Tue, 3 Feb 2015 19:20:59 +0000 (19:20 +0000)
committerjcarsey <jcarsey@Edk2>
Tue, 3 Feb 2015 19:20:59 +0000 (19:20 +0000)
Updates to Level1 profile commands response output.
Updating Level1 profile commands source code to include command name as a prefix in error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16728 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel1CommandsLib/Exit.c
ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c
ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
ShellPkg/Library/UefiShellLevel1CommandsLib/Shift.c
ShellPkg/Library/UefiShellLevel1CommandsLib/Stall.c
ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni

index 3a3c59fa0396eed88f65d4066309a78c3c4c5ddb..d8e6adca7f139ed9b31c33f6611eefd4bc25c797 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for exit shell level 1 function.\r
 \r
+  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2009 - 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
@@ -56,7 +57,7 @@ ShellCommandRunExit (
   Status = ShellCommandLineParse (ParamList, &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), gShellLevel1HiiHandle, ProblemParam);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"exit", ProblemParam);\r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -71,7 +72,7 @@ ShellCommandRunExit (
     if (Return != NULL) {\r
       Status = ShellConvertStringToUint64(Return, &RetVal, FALSE, FALSE);\r
       if (EFI_ERROR(Status)) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, Return);\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel1HiiHandle, L"exit", Return);\r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       } else {\r
         //\r
index 40f6677f9baa59541f1ece5af9431d47a8b8ea8f..d2896fe2f4671b8cdeba5517edaa918a08b8192c 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for endfor and for shell level 1 functions.\r
 \r
+  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2009 - 2014, 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
@@ -75,12 +76,12 @@ ShellCommandRunEndFor (
   ASSERT_EFI_ERROR(Status);\r
 \r
   if (!gEfiShellProtocol->BatchIsActive()) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"EndFor");\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"endfor");\r
     return (SHELL_UNSUPPORTED);\r
   }\r
 \r
   if (gEfiShellParametersProtocol->Argc > 1) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle);\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"endfor");\r
     return (SHELL_INVALID_PARAMETER);\r
   }\r
 \r
@@ -323,12 +324,12 @@ ShellCommandRunFor (
   ASSERT_EFI_ERROR(Status);\r
 \r
   if (!gEfiShellProtocol->BatchIsActive()) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"For");\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"for");\r
     return (SHELL_UNSUPPORTED);\r
   }\r
 \r
   if (gEfiShellParametersProtocol->Argc < 4) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle);\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"for");\r
     return (SHELL_INVALID_PARAMETER);\r
   }\r
 \r
index 4d48c7f1e9436ac351678ea345276f10b4558276..cf97836ab399a7e90d19ef9e6bb94428db1e8556 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for goto shell level 1 function.\r
 \r
+  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2009 - 2010, 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
@@ -58,7 +59,7 @@ ShellCommandRunGoto (
   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), gShellLevel1HiiHandle, ProblemParam);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"goto", ProblemParam);\r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -66,10 +67,10 @@ ShellCommandRunGoto (
     }\r
   } else {\r
     if (ShellCommandLineGetRawValue(Package, 2) != NULL) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"goto");\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else if (ShellCommandLineGetRawValue(Package, 1) == NULL) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"goto");\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
       Size = 0;\r
index 5d9ccdd9444ccc594d20b78e9177d693cc35b309..f548c2ea7847e7a03f151eaa613bda2696cfd20a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for If and else shell level 1 function.\r
 \r
-  Copyright (c) 2013, Hewlett-Packard Development Company, L.P.\r
+  Copyright (c) 2013 - 2015, Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2009 - 2014, 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
@@ -831,12 +831,12 @@ ShellCommandRunIf (
   ASSERT_EFI_ERROR(Status);\r
 \r
   if (!gEfiShellProtocol->BatchIsActive()) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"If");\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"if");  \r
     return (SHELL_UNSUPPORTED);\r
   }\r
 \r
   if (gEfiShellParametersProtocol->Argc < 3) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle);\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"if");  \r
     return (SHELL_INVALID_PARAMETER);\r
   }\r
 \r
@@ -914,12 +914,12 @@ ShellCommandRunIf (
       // we are at the then\r
       //\r
       if (CurrentParameter+1 != gEfiShellParametersProtocol->Argc) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_TEXT_AFTER_THEN), gShellLevel1HiiHandle);\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_TEXT_AFTER_THEN), gShellLevel1HiiHandle, L"if");  \r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       } else {\r
         Status = PerformResultOperation(CurrentValue);\r
         if (EFI_ERROR(Status)) {\r
-          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, gEfiShellParametersProtocol->Argv[CurrentParameter]);\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);  \r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         }\r
       }\r
@@ -957,7 +957,7 @@ ShellCommandRunIf (
           if ((Ending == EndTagOr && CurrentValue) || (Ending == EndTagAnd && !CurrentValue)) {\r
             Status = PerformResultOperation(CurrentValue);\r
             if (EFI_ERROR(Status)) {\r
-              ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, gEfiShellParametersProtocol->Argv[CurrentParameter]);\r
+              ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);  \r
               ShellStatus = SHELL_INVALID_PARAMETER;\r
             }\r
             break;\r
@@ -995,7 +995,7 @@ ShellCommandRunElse (
   ASSERT_EFI_ERROR(CommandInit());\r
 \r
   if (gEfiShellParametersProtocol->Argc > 1) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle);\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");  \r
     return (SHELL_INVALID_PARAMETER);\r
   }\r
 \r
@@ -1070,7 +1070,7 @@ ShellCommandRunEndIf (
   ASSERT_EFI_ERROR(CommandInit());\r
 \r
   if (gEfiShellParametersProtocol->Argc > 1) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle);\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");  \r
     return (SHELL_INVALID_PARAMETER);\r
   }\r
 \r
index 9abb4c31b1dac7b79a00e8ee889a3df9a16099e9..978ef1e354352fde42ff8cfffebad49bf6c68a34 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for Shift shell level 1 function.\r
 \r
+  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 2009 - 2010, 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
@@ -35,7 +36,7 @@ ShellCommandRunShift (
   ASSERT_EFI_ERROR(Status);\r
 \r
   if (!gEfiShellProtocol->BatchIsActive()) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"Shift");\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"shift");  \r
     return (SHELL_UNSUPPORTED);\r
   }\r
 \r
@@ -43,7 +44,7 @@ ShellCommandRunShift (
   ASSERT(CurrentScriptFile != NULL);\r
 \r
   if (CurrentScriptFile->Argc < 2) {\r
-    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle);\r
+    ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"shift");  \r
     return (SHELL_UNSUPPORTED);\r
   }\r
 \r
index 2270323190a80489e35b5bb44e6440115488b356..be15d593cb65215500301b3619019a52eac40464 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Main file for stall shell level 1 function.\r
 \r
+  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
   Copyright (c) 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
@@ -50,7 +51,7 @@ ShellCommandRunStall (
   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), gShellLevel1HiiHandle, ProblemParam);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"stall", ProblemParam);  \r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -58,20 +59,20 @@ ShellCommandRunStall (
     }\r
   } else {\r
     if (ShellCommandLineGetRawValue(Package, 2) != NULL) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"stall");  \r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else if (ShellCommandLineGetRawValue(Package, 1) == NULL) {\r
-      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"stall");  \r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
       Status = ShellConvertStringToUint64(ShellCommandLineGetRawValue(Package, 1), &Intermediate, FALSE, FALSE);\r
       if (EFI_ERROR(Status) || ((UINT64)(UINTN)(Intermediate)) != Intermediate) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel1HiiHandle, ShellCommandLineGetRawValue(Package, 1));\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel1HiiHandle, L"stall", ShellCommandLineGetRawValue(Package, 1));  \r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       } else {\r
         Status = gBS->Stall((UINTN)Intermediate);\r
         if (EFI_ERROR(Status)) {\r
-          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_STALL_FAILED), gShellLevel1HiiHandle, Status);\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_STALL_FAILED), gShellLevel1HiiHandle, L"stall");  \r
           ShellStatus = SHELL_DEVICE_ERROR;\r
         }\r
       }\r
index 572f7cfd79d3b7172abc44e92f680de6b5922419..01737be3bef67628f32982aa8c5c8a787c623414 100644 (file)
Binary files a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni and b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni differ