summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c
diff options
context:
space:
mode:
authorJaben Carsey <Jaben.carsey@intel.com>2014-07-25 18:46:23 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-07-25 18:46:23 +0000
commit17e59b3346b7486fabbc57a13ef5b8c98d25a5a5 (patch)
treeaa137730c2bf3847cc344db7240a231b6df6cd63 /ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c
parent6cb9566f264e2fa2dcde695317945114e1b011c7 (diff)
downloadedk2-platforms-17e59b3346b7486fabbc57a13ef5b8c98d25a5a5.tar.xz
ShellPkg: Fix calls to SimpleTextOut->SetAttribute to not use reserved bits
As the shell inverts foreground and background it needs to be sure that it properly masks off the reserved bits and this is important since the foreground and background are not the same numbers of bits. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hp.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15681 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c b/ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c
index 8cb1aedf43..96028e4fc4 100644
--- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c
+++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c
@@ -1,7 +1,7 @@
/** @file
Main file for attrib shell level 2 function.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -111,7 +111,7 @@ ShellCommandRunCls (
break;
}
ForeColor = (~ShellStrToUintn(Param1)) & 0xF;
- Status = gST->ConOut->SetAttribute (gST->ConOut, ForeColor | Background);
+ Status = gST->ConOut->SetAttribute (gST->ConOut, (ForeColor | Background) & 0x7F );
ASSERT_EFI_ERROR(Status);
Status = gST->ConOut->ClearScreen (gST->ConOut);
ASSERT_EFI_ERROR(Status);