]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c
ShellPkg: Standardized HP Copyright Message String
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel3CommandsLib / Cls.c
index dec24776ff53033e97dfafeceb55f65f94547d12..61b9ef854e5c532732cc28f2730595f75cad6935 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
   Main file for attrib shell level 2 function.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>\r
+  (C) Copyright 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
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -29,21 +30,18 @@ ShellCommandRunCls (
 {\r
   EFI_STATUS    Status;\r
   LIST_ENTRY    *Package;\r
-  CHAR16        *Message;\r
   UINTN         Background;\r
   UINTN         ForeColor;\r
   CHAR16        *ProblemParam;\r
   SHELL_STATUS  ShellStatus;\r
   CONST CHAR16  *Param1;\r
 \r
-  ShellStatus   = SHELL_SUCCESS;\r
-  ProblemParam  = NULL;\r
-  Background    = 0;\r
-\r
   //\r
   // Initialize variables\r
   //\r
-  Message = NULL;\r
+  ShellStatus   = SHELL_SUCCESS;\r
+  ProblemParam  = NULL;\r
+  Background    = 0;\r
 \r
   //\r
   // initialize the shell lib (we must be in non-auto-init...)\r
@@ -57,7 +55,7 @@ ShellCommandRunCls (
   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), gShellLevel3HiiHandle, ProblemParam);\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"cls", ProblemParam);  \r
       FreePool(ProblemParam);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
@@ -80,11 +78,11 @@ ShellCommandRunCls (
         //\r
         gST->ConOut->ClearScreen (gST->ConOut);\r
       } else if (ShellCommandLineGetCount(Package) > 2) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle);\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"cls");  \r
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       } else {\r
         if (ShellStrToUintn(Param1) > 7 || StrLen(Param1) > 1 || !ShellIsDecimalDigitCharacter(*Param1)) {\r
-          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, Param1);\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel3HiiHandle, L"cls", Param1);  \r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         } else {\r
           switch (ShellStrToUintn(Param1)) {\r
@@ -114,7 +112,7 @@ ShellCommandRunCls (
               break;\r
           }\r
           ForeColor = (~ShellStrToUintn(Param1)) & 0xF;\r
-          Status = gST->ConOut->SetAttribute (gST->ConOut, ForeColor | Background);\r
+          Status = gST->ConOut->SetAttribute (gST->ConOut, (ForeColor | Background) & 0x7F );\r
           ASSERT_EFI_ERROR(Status);\r
           Status = gST->ConOut->ClearScreen (gST->ConOut);\r
           ASSERT_EFI_ERROR(Status);\r