]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update Code to pass EBC compiler.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 13 May 2013 02:36:09 +0000 (02:36 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 13 May 2013 02:36:09 +0000 (02:36 +0000)
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14352 6f19259b-4bc3-4df7-8a09-765794883524

12 files changed:
IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/FloppyPeim.c
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
MdeModulePkg/MdeModulePkg.dsc
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
NetworkPkg/NetworkPkg.dsc
OptionRomPkg/OptionRomPkg.dsc
PerformancePkg/PerformancePkg.dsc
SecurityPkg/SecurityPkg.dsc
ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
ShellPkg/Library/UefiShellLevel3CommandsLib/GetMtc.c

index afeb2213c00dc6756acf3a95664ec8b812204823..d1b7dcf416a1909c336b6a4bc0e5b3965dc55ac3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Floppy Peim to support Recovery function from Floppy device.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -1018,22 +1018,12 @@ DiscoverFdcDevice (
   // Check Media\r
   //\r
   Status = DisketChanged (FdcBlkIoDev, Info);\r
-  switch (Status) {\r
-  case EFI_NO_MEDIA:\r
+  if (Status == EFI_NO_MEDIA) {\r
     //\r
     // No diskette in floppy.\r
     //\r
-    MediaInfo->MediaPresent = FALSE;\r
-    break;\r
-\r
-  case EFI_MEDIA_CHANGED:\r
-  case EFI_SUCCESS:\r
-    //\r
-    // Diskette exists in floppy.\r
-    //\r
-    break;\r
-\r
-  default:\r
+    MediaInfo->MediaPresent = FALSE;    \r
+  } else if (Status != EFI_MEDIA_CHANGED && Status != EFI_SUCCESS) {\r
     //\r
     // EFI_DEVICE_ERROR\r
     //\r
index b00406715576cbfec8fef8a63acc63036020d840..4f4d63dc4a38f961ee5d391f23be8beb514bd41d 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 # This file is used to build all modules in IntelFrameworkModulePkg.\r
 #\r
-#Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+#Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #This program and the accompanying materials are licensed and made available under \r
 #the terms and conditions of the BSD License that accompanies this distribution.  \r
 #The full text of the license may be found at\r
@@ -80,6 +80,9 @@
   PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
 \r
+[LibraryClasses.EBC.PEIM]\r
+  IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf\r
+\r
 [LibraryClasses.common.DXE_DRIVER]\r
   LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf\r
 \r
index 835f621b69ec1a6db20999336cc307c1c1f04578..444cd8358c05990e0b14a174cde70179898bf564 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # EFI/PI Reference Module Package for All Architectures\r
 #\r
-# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #    This program and the accompanying materials\r
 #    are licensed and made available under the terms and conditions of the BSD License\r
   #\r
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf\r
 \r
+[LibraryClasses.EBC]\r
+  LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf\r
 \r
 [PcdsFeatureFlag]\r
   gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE\r
   MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf\r
   MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf\r
   MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf\r
-  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf\r
-  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf\r
   MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
   MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf\r
   MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf\r
   MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf\r
   MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf\r
   MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf\r
+  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf\r
+  MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf\r
   MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf\r
   MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf\r
   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf\r
index ce17e4f928b6376765ab7b2f38611ae6529515e6..dae12a4869004a63e2f55f5159fc850a5bc1ea56 100644 (file)
@@ -5,7 +5,7 @@
   for Firmware Basic Boot Performance Record and other boot performance records, \r
   and install FPDT to ACPI table.\r
 \r
-  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 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 accompanies this distribution.  The full text of the license may be found at\r
@@ -238,7 +238,7 @@ InstallFirmwarePerformanceDataTable (
   EFI_ACPI_TABLE_PROTOCOL       *AcpiTableProtocol;\r
   EFI_PHYSICAL_ADDRESS          Address;\r
   UINTN                         Size;\r
-  UINT8                         SmmBootRecordCommBuffer[SMM_BOOT_RECORD_COMM_SIZE];\r
+  UINT8                         *SmmBootRecordCommBuffer;\r
   EFI_SMM_COMMUNICATE_HEADER    *SmmCommBufferHeader;\r
   SMM_BOOT_RECORD_COMMUNICATE   *SmmCommData;\r
   UINTN                         CommSize;\r
@@ -259,6 +259,8 @@ InstallFirmwarePerformanceDataTable (
   //\r
   // Collect boot records from SMM drivers.\r
   //\r
+  SmmBootRecordCommBuffer = AllocateZeroPool (SMM_BOOT_RECORD_COMM_SIZE);\r
+  ASSERT (SmmBootRecordCommBuffer != NULL);\r
   SmmCommData = NULL;\r
   Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &Communication);\r
   if (!EFI_ERROR (Status)) {\r
@@ -294,6 +296,7 @@ InstallFirmwarePerformanceDataTable (
       ASSERT_EFI_ERROR(SmmCommData->ReturnStatus);\r
     }\r
   }\r
+  FreePool (SmmBootRecordCommBuffer);\r
 \r
   //\r
   // Prepare memory for runtime Performance Record. \r
index 2a9fcb94e5b573344d81fee407ccf619799b576c..790e44be4c0e0323e16ddce0be2717ade7b11ec1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding for IP4 CONFIG protocol.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 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 accompanies this distribution.  The full text of the license may be found at<BR>\r
@@ -71,7 +71,7 @@ IP4_CONFIG_INSTANCE        mIp4ConfigTemplate = {
   NULL,\r
   NULL,\r
   NULL,\r
-  EFI_NOT_READY,\r
+  0,\r
   {\r
     0,\r
     0,\r
@@ -109,6 +109,8 @@ Ip4ConfigDriverEntryPoint (
   IN EFI_SYSTEM_TABLE       *SystemTable\r
   )\r
 {\r
+  mIp4ConfigTemplate.Result = EFI_NOT_READY;\r
+\r
   return EfiLibInstallDriverBindingComponentName2 (\r
            ImageHandle,\r
            SystemTable,\r
index 3055cf675d8cabadc7f68b24da2e66f2606fb6f9..b5848b7e95d58567173f35d00bd3361856fcd0ca 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # UEFI 2.2 Network Module Package for All Architectures\r
 #\r
-# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #    This program and the accompanying materials\r
 #    are licensed and made available under the terms and conditions of the BSD License\r
 ###################################################################################################\r
 \r
 [Components]\r
-  NetworkPkg/IpSecDxe/IpSecDxe.inf\r
   NetworkPkg/Ip6Dxe/Ip6Dxe.inf\r
   NetworkPkg/TcpDxe/TcpDxe.inf\r
   NetworkPkg/Udp6Dxe/Udp6Dxe.inf\r
   NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf\r
   NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf\r
 \r
+  NetworkPkg/Application/IfConfig6/IfConfig6.inf\r
+  NetworkPkg/Application/IpsecConfig/IpSecConfig.inf\r
+  NetworkPkg/Application/VConfig/VConfig.inf\r
+\r
 [Components.IA32, Components.X64, Components.IPF]\r
+  NetworkPkg/IpSecDxe/IpSecDxe.inf\r
   NetworkPkg/IScsiDxe/IScsiDxe.inf\r
   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   NetworkPkg/Application/Ping6/Ping6.inf\r
-  NetworkPkg/Application/IfConfig6/IfConfig6.inf\r
-  NetworkPkg/Application/IpsecConfig/IpSecConfig.inf\r
-  NetworkPkg/Application/VConfig/VConfig.inf\r
index 522038f2808e33129b347141ada70a2f6e4ae0c4..4fdcf6d9b35041316cc2166be8635950e2f9230a 100644 (file)
@@ -6,7 +6,7 @@
 # Option ROM image for all CPU architectures, including EBC target.\r
 # A single driver can support mixes of EFI 1.1, UEFI 2.0 and UEFI 2.1.\r
 #\r
-# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
   OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf\r
   OptionRomPkg/Library/GopBltLib/GopBltLib.inf\r
 \r
-  OptionRomPkg/Application/BltLibSample/BltLibSample.inf\r
-\r
   OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf\r
   OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf\r
   OptionRomPkg/UndiRuntimeDxe/UndiRuntimeDxe.inf\r
 \r
+[Components.IA32, Components.X64, Components.IPF]\r
+  OptionRomPkg/Application/BltLibSample/BltLibSample.inf\r
index 0274229e227af816f7d1bd691b06e755725962dd..6d48ae30a55ec013934a80fbbf372f6d871c9993 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Build description file to generate Shell DP application.\r
 #\r
-# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 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 accompanies this distribution.  The full text of the license may be found at\r
@@ -70,6 +70,9 @@
   PalLib|MdePkg/Library/UefiPalLib/UefiPalLib.inf\r
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
 \r
+[LibraryClasses.EBC]\r
+  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
+\r
 [Components.IA32, Components.X64]\r
   PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.inf\r
   PerformancePkg/Library/TscTimerLib/PeiTscTimerLib.inf\r
index 9c8c9060e88efaec2e3720d9b3d3455836c03482..54b5b2464dbec2cfdba5735a9868833f073b8de8 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Security Module Package for All Architectures.\r
 #\r
-# Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 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 accompanies this distribution. The full text of the license may be found at\r
@@ -92,8 +92,6 @@
   SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthenticationStatusLib.inf\r
   SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf\r
   SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf\r
-  SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderDxe.inf\r
-  SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderDxe.inf\r
 \r
   #\r
   # Application\r
   # TPM\r
   #\r
   SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf\r
-  SecurityPkg/Tcg/TcgPei/TcgPei.inf\r
-  SecurityPkg/Tcg/TcgDxe/TcgDxe.inf\r
+  SecurityPkg/Library/TpmCommLib/TpmCommLib.inf\r
+\r
   SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf\r
   SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf\r
+  \r
+[Components.IA32, Components.X64, Components.IPF]\r
+  SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderDxe.inf\r
+  SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderDxe.inf\r
+  SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
+  SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf\r
+\r
+  #\r
+  # TPM\r
+  #\r
+  SecurityPkg/Tcg/TcgPei/TcgPei.inf\r
+  SecurityPkg/Tcg/TcgDxe/TcgDxe.inf\r
   SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf {\r
     <LibraryClasses>\r
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   }\r
-  SecurityPkg/Tcg/TcgSmm/TcgSmm.inf\r
-  SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
-  \r
+\r
 [Components.IA32, Components.X64]\r
-  SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf\r
   SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.inf\r
   SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.inf\r
+  SecurityPkg/Tcg/TcgSmm/TcgSmm.inf\r
 \r
 [Components.IPF]\r
   SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/EsalVariableDxeSal.inf \r
 \r
-[Components.EBC]\r
-# Build only\r
-  SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf \r
-\r
 [BuildOptions]\r
    MSFT:*_*_IA32_DLINK_FLAGS = /ALIGN:256\r
   INTEL:*_*_IA32_DLINK_FLAGS = /ALIGN:256\r
index 78e432bcd4f98f8fc1b4186ded67675bce613841..2725f4ad39124a8d241e3e2eab69e29bc375d74f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for map shell level 2 command.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 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 accompanies this distribution.  The full text of the license may be found at\r
@@ -1091,18 +1091,15 @@ ShellCommandRunMap (
           if (SName != NULL) {\r
             Status = PerformMappingDelete(SName);\r
             if (EFI_ERROR(Status)) {\r
-              switch (Status) {\r
-                case EFI_ACCESS_DENIED:\r
-                  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle);\r
-                  ShellStatus = SHELL_ACCESS_DENIED;\r
-                  break;\r
-                case EFI_NOT_FOUND:\r
-                  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName);\r
-                  ShellStatus = SHELL_INVALID_PARAMETER;\r
-                  break;\r
-                default:\r
-                  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);\r
-                  ShellStatus = SHELL_UNSUPPORTED;\r
+              if (Status == EFI_ACCESS_DENIED) {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle);\r
+                ShellStatus = SHELL_ACCESS_DENIED;\r
+              } else if (Status == EFI_NOT_FOUND) {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName);\r
+                ShellStatus = SHELL_INVALID_PARAMETER;\r
+              } else {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);\r
+                ShellStatus = SHELL_UNSUPPORTED;\r
               }\r
             }\r
           } else {\r
index 11abee07664b12d2a114c835a395fa856e2b2e32..9ce915b96c4a98c77bc92f582383b1c7adeb1310 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for mv shell level 2 function.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 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 accompanies this distribution.  The full text of the license may be found at\r
@@ -404,23 +404,18 @@ ValidateAndMoveFiles(
       //\r
       if (EFI_ERROR(Status)) {\r
         ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);\r
-        //\r
-        // move failed\r
-        //\r
-        switch(Status){\r
-          default:\r
-            ShellStatus = SHELL_INVALID_PARAMETER;\r
-          case EFI_SECURITY_VIOLATION:\r
-            ShellStatus = SHELL_SECURITY_VIOLATION;\r
-          case EFI_WRITE_PROTECTED:\r
-            ShellStatus = SHELL_WRITE_PROTECTED;\r
-          case EFI_OUT_OF_RESOURCES:\r
-            ShellStatus = SHELL_OUT_OF_RESOURCES;\r
-          case EFI_DEVICE_ERROR:\r
-            ShellStatus = SHELL_DEVICE_ERROR;\r
-          case EFI_ACCESS_DENIED:\r
-            ShellStatus = SHELL_ACCESS_DENIED;\r
-        } // switch\r
+        ShellStatus = SHELL_INVALID_PARAMETER;\r
+        if (Status == EFI_SECURITY_VIOLATION) {\r
+          ShellStatus = SHELL_SECURITY_VIOLATION;\r
+        } else if (Status == EFI_WRITE_PROTECTED) {\r
+          ShellStatus = SHELL_WRITE_PROTECTED;\r
+        } else if (Status == EFI_OUT_OF_RESOURCES) {\r
+          ShellStatus = SHELL_OUT_OF_RESOURCES;\r
+        } else if (Status == EFI_DEVICE_ERROR) {\r
+          ShellStatus = SHELL_DEVICE_ERROR;\r
+        } else if (Status == EFI_ACCESS_DENIED) {\r
+          ShellStatus = SHELL_ACCESS_DENIED;\r
+        }\r
       } else {\r
         ShellPrintEx(-1, -1, L"%s", HiiResultOk);\r
       }\r
index ce1eb1fcf03c2c3ffb5a266bcf0c1cf9801244bb..f1b20a13e39306b2c67f2e36aef9db9701e66ec4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for GetMtc shell level 3 function.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2009 - 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 accompanies this distribution.  The full text of the license may be found at\r
@@ -70,17 +70,12 @@ ShellCommandRunGetMtc (
       // Get the monotonic counter count\r
       //\r
       Status = gBS->GetNextMonotonicCount(&Mtc);\r
-      switch(Status) {\r
-        case EFI_DEVICE_ERROR:\r
-          ShellStatus = SHELL_DEVICE_ERROR;\r
-          break;\r
-        case EFI_SECURITY_VIOLATION:\r
-          ShellStatus = SHELL_SECURITY_VIOLATION;\r
-          break;\r
-        default:\r
-          if (EFI_ERROR(Status)) {\r
-            ShellStatus = SHELL_DEVICE_ERROR;\r
-          }\r
+      if (Status == EFI_DEVICE_ERROR) {\r
+        ShellStatus = SHELL_DEVICE_ERROR;\r
+      } else if (Status == EFI_SECURITY_VIOLATION) {\r
+        ShellStatus = SHELL_SECURITY_VIOLATION;\r
+      } else if (EFI_ERROR(Status)) {\r
+        ShellStatus = SHELL_DEVICE_ERROR;\r
       }\r
 \r
       //\r