Revision: 19413
          http://sourceforge.net/p/edk2/code/19413
Author:   vanjeff
Date:     2015-12-18 07:41:39 +0000 (Fri, 18 Dec 2015)
Log Message:
-----------
ShellPkg: Fix a bug in smbiosview PowerSupply Characteristics.

Fix bit shifting when isolating the Characteristics of Power Supply information.

(Sync patch r19291 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <[email protected]>
Reviewed-by: Qiu Shumin <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/19291

Modified Paths:
--------------
    
branches/UDK2015/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c

Modified: 
branches/UDK2015/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
===================================================================
--- 
branches/UDK2015/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
 2015-12-18 07:41:07 UTC (rev 19412)
+++ 
branches/UDK2015/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
 2015-12-18 07:41:39 UTC (rev 19413)
@@ -3100,7 +3100,7 @@
   // Bits 13:10 - DMTF Power Supply Type
   //
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TYPE), 
gShellDebug1HiiHandle);
-  Temp = (Characteristics & 0x1C00) << 10;
+  Temp = (Characteristics & 0x1C00) >> 10;
   switch (Temp) {
   case 1:
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);
@@ -3141,7 +3141,7 @@
   // Bits 9:7 - Status
   //
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_STATUS_DASH), gShellDebug1HiiHandle);
-  Temp = (Characteristics & 0x380) << 7;
+  Temp = (Characteristics & 0x380) >> 7;
   switch (Temp) {
   case 1:
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);
@@ -3170,7 +3170,7 @@
   // Bits 6:3 - DMTF Input Voltage Range Switching
   //
   ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_INPUT_VOLTAGE_RANGE), gShellDebug1HiiHandle);
-  Temp = (Characteristics & 0x78) << 3;
+  Temp = (Characteristics & 0x78) >> 3;
   switch (Temp) {
   case 1:
     ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle);


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to