Revision: 14352
http://edk2.svn.sourceforge.net/edk2/?rev=14352&view=rev
Author: lgao4
Date: 2013-05-13 02:36:09 +0000 (Mon, 13 May 2013)
Log Message:
-----------
Update Code to pass EBC compiler.
Signed-off-by: Liming Gao <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
Modified Paths:
--------------
trunk/edk2/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/FloppyPeim.c
trunk/edk2/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
trunk/edk2/MdeModulePkg/MdeModulePkg.dsc
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
trunk/edk2/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
trunk/edk2/NetworkPkg/NetworkPkg.dsc
trunk/edk2/OptionRomPkg/OptionRomPkg.dsc
trunk/edk2/PerformancePkg/PerformancePkg.dsc
trunk/edk2/SecurityPkg/SecurityPkg.dsc
trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/GetMtc.c
Modified: trunk/edk2/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/FloppyPeim.c
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/FloppyPeim.c
2013-05-12 23:56:35 UTC (rev 14351)
+++ trunk/edk2/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/FloppyPeim.c
2013-05-13 02:36:09 UTC (rev 14352)
@@ -1,7 +1,7 @@
/** @file
Floppy Peim to support Recovery function from Floppy device.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -1018,23 +1018,13 @@
// Check Media
//
Status = DisketChanged (FdcBlkIoDev, Info);
- switch (Status) {
- case EFI_NO_MEDIA:
+ if (Status == EFI_NO_MEDIA) {
//
// No diskette in floppy.
//
- MediaInfo->MediaPresent = FALSE;
- break;
-
- case EFI_MEDIA_CHANGED:
- case EFI_SUCCESS:
+ MediaInfo->MediaPresent = FALSE;
+ } else if (Status != EFI_MEDIA_CHANGED && Status != EFI_SUCCESS) {
//
- // Diskette exists in floppy.
- //
- break;
-
- default:
- //
// EFI_DEVICE_ERROR
//
MotorOff (FdcBlkIoDev, Info);
Modified: trunk/edk2/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
2013-05-12 23:56:35 UTC (rev 14351)
+++ trunk/edk2/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
2013-05-13 02:36:09 UTC (rev 14352)
@@ -3,7 +3,7 @@
#
# This file is used to build all modules in IntelFrameworkModulePkg.
#
-#Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+#Copyright (c) 2007 - 2013, 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 that accompanies this
distribution.
#The full text of the license may be found at
@@ -80,6 +80,9 @@
PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
+[LibraryClasses.EBC.PEIM]
+ IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf
+
[LibraryClasses.common.DXE_DRIVER]
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
Modified: trunk/edk2/MdeModulePkg/MdeModulePkg.dsc
===================================================================
--- trunk/edk2/MdeModulePkg/MdeModulePkg.dsc 2013-05-12 23:56:35 UTC (rev
14351)
+++ trunk/edk2/MdeModulePkg/MdeModulePkg.dsc 2013-05-13 02:36:09 UTC (rev
14352)
@@ -1,7 +1,7 @@
## @file
# EFI/PI Reference Module Package for All Architectures
#
-# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2013, 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
@@ -151,6 +151,8 @@
#
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+[LibraryClasses.EBC]
+ LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
[PcdsFeatureFlag]
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE
@@ -242,8 +244,6 @@
MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf
- MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
- MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf
MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
@@ -336,6 +336,8 @@
MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf
MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
+ MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
+ MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
Modified:
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
===================================================================
---
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
2013-05-12 23:56:35 UTC (rev 14351)
+++
trunk/edk2/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
2013-05-13 02:36:09 UTC (rev 14352)
@@ -5,7 +5,7 @@
for Firmware Basic Boot Performance Record and other boot performance
records,
and install FPDT to ACPI table.
- Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2013, 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
@@ -238,7 +238,7 @@
EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol;
EFI_PHYSICAL_ADDRESS Address;
UINTN Size;
- UINT8
SmmBootRecordCommBuffer[SMM_BOOT_RECORD_COMM_SIZE];
+ UINT8 *SmmBootRecordCommBuffer;
EFI_SMM_COMMUNICATE_HEADER *SmmCommBufferHeader;
SMM_BOOT_RECORD_COMMUNICATE *SmmCommData;
UINTN CommSize;
@@ -259,6 +259,8 @@
//
// Collect boot records from SMM drivers.
//
+ SmmBootRecordCommBuffer = AllocateZeroPool (SMM_BOOT_RECORD_COMM_SIZE);
+ ASSERT (SmmBootRecordCommBuffer != NULL);
SmmCommData = NULL;
Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID
**) &Communication);
if (!EFI_ERROR (Status)) {
@@ -294,6 +296,7 @@
ASSERT_EFI_ERROR(SmmCommData->ReturnStatus);
}
}
+ FreePool (SmmBootRecordCommBuffer);
//
// Prepare memory for runtime Performance Record.
Modified:
trunk/edk2/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
2013-05-12 23:56:35 UTC (rev 14351)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
2013-05-13 02:36:09 UTC (rev 14352)
@@ -1,7 +1,7 @@
/** @file
The driver binding for IP4 CONFIG protocol.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, 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<BR>
@@ -71,7 +71,7 @@
NULL,
NULL,
NULL,
- EFI_NOT_READY,
+ 0,
{
0,
0,
@@ -109,6 +109,8 @@
IN EFI_SYSTEM_TABLE *SystemTable
)
{
+ mIp4ConfigTemplate.Result = EFI_NOT_READY;
+
return EfiLibInstallDriverBindingComponentName2 (
ImageHandle,
SystemTable,
Modified: trunk/edk2/NetworkPkg/NetworkPkg.dsc
===================================================================
--- trunk/edk2/NetworkPkg/NetworkPkg.dsc 2013-05-12 23:56:35 UTC (rev
14351)
+++ trunk/edk2/NetworkPkg/NetworkPkg.dsc 2013-05-13 02:36:09 UTC (rev
14352)
@@ -1,7 +1,7 @@
## @file
# UEFI 2.2 Network Module Package for All Architectures
#
-# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2013, 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
@@ -85,17 +85,18 @@
###################################################################################################
[Components]
- NetworkPkg/IpSecDxe/IpSecDxe.inf
NetworkPkg/Ip6Dxe/Ip6Dxe.inf
NetworkPkg/TcpDxe/TcpDxe.inf
NetworkPkg/Udp6Dxe/Udp6Dxe.inf
NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
+ NetworkPkg/Application/IfConfig6/IfConfig6.inf
+ NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
+ NetworkPkg/Application/VConfig/VConfig.inf
+
[Components.IA32, Components.X64, Components.IPF]
+ NetworkPkg/IpSecDxe/IpSecDxe.inf
NetworkPkg/IScsiDxe/IScsiDxe.inf
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
NetworkPkg/Application/Ping6/Ping6.inf
- NetworkPkg/Application/IfConfig6/IfConfig6.inf
- NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
- NetworkPkg/Application/VConfig/VConfig.inf
Modified: trunk/edk2/OptionRomPkg/OptionRomPkg.dsc
===================================================================
--- trunk/edk2/OptionRomPkg/OptionRomPkg.dsc 2013-05-12 23:56:35 UTC (rev
14351)
+++ trunk/edk2/OptionRomPkg/OptionRomPkg.dsc 2013-05-13 02:36:09 UTC (rev
14352)
@@ -6,7 +6,7 @@
# Option ROM image for all CPU architectures, including EBC target.
# A single driver can support mixes of EFI 1.1, UEFI 2.0 and UEFI 2.1.
#
-# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2013, 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
@@ -101,9 +101,9 @@
OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
OptionRomPkg/Library/GopBltLib/GopBltLib.inf
- OptionRomPkg/Application/BltLibSample/BltLibSample.inf
-
OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf
OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf
OptionRomPkg/UndiRuntimeDxe/UndiRuntimeDxe.inf
+[Components.IA32, Components.X64, Components.IPF]
+ OptionRomPkg/Application/BltLibSample/BltLibSample.inf
Modified: trunk/edk2/PerformancePkg/PerformancePkg.dsc
===================================================================
--- trunk/edk2/PerformancePkg/PerformancePkg.dsc 2013-05-12 23:56:35 UTC
(rev 14351)
+++ trunk/edk2/PerformancePkg/PerformancePkg.dsc 2013-05-13 02:36:09 UTC
(rev 14352)
@@ -1,7 +1,7 @@
## @file
# Build description file to generate Shell DP application.
#
-# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2013, 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
@@ -70,6 +70,9 @@
PalLib|MdePkg/Library/UefiPalLib/UefiPalLib.inf
TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+[LibraryClasses.EBC]
+ TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+
[Components.IA32, Components.X64]
PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.inf
PerformancePkg/Library/TscTimerLib/PeiTscTimerLib.inf
Modified: trunk/edk2/SecurityPkg/SecurityPkg.dsc
===================================================================
--- trunk/edk2/SecurityPkg/SecurityPkg.dsc 2013-05-12 23:56:35 UTC (rev
14351)
+++ trunk/edk2/SecurityPkg/SecurityPkg.dsc 2013-05-13 02:36:09 UTC (rev
14352)
@@ -1,7 +1,7 @@
## @file
# Security Module Package for All Architectures.
#
-# Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2013, 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
@@ -92,8 +92,6 @@
SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthenticationStatusLib.inf
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf
-
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderDxe.inf
-
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderDxe.inf
#
# Application
@@ -104,29 +102,35 @@
# TPM
#
SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf
+ SecurityPkg/Library/TpmCommLib/TpmCommLib.inf
+
+ SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf
+ SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
+
+[Components.IA32, Components.X64, Components.IPF]
+
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderDxe.inf
+
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderDxe.inf
+ SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+ SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf
+
+ #
+ # TPM
+ #
SecurityPkg/Tcg/TcgPei/TcgPei.inf
SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
- SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf
- SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf {
<LibraryClasses>
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
}
- SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
- SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
-
+
[Components.IA32, Components.X64]
- SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf
SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.inf
SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.inf
+ SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
[Components.IPF]
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/EsalVariableDxeSal.inf
-[Components.EBC]
-# Build only
- SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf
-
[BuildOptions]
MSFT:*_*_IA32_DLINK_FLAGS = /ALIGN:256
INTEL:*_*_IA32_DLINK_FLAGS = /ALIGN:256
Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
2013-05-12 23:56:35 UTC (rev 14351)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
2013-05-13 02:36:09 UTC (rev 14352)
@@ -1,7 +1,7 @@
/** @file
Main file for map shell level 2 command.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2013, 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
@@ -1091,18 +1091,15 @@
if (SName != NULL) {
Status = PerformMappingDelete(SName);
if (EFI_ERROR(Status)) {
- switch (Status) {
- case EFI_ACCESS_DENIED:
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),
gShellLevel2HiiHandle);
- ShellStatus = SHELL_ACCESS_DENIED;
- break;
- case EFI_NOT_FOUND:
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF),
gShellLevel2HiiHandle, SName);
- ShellStatus = SHELL_INVALID_PARAMETER;
- break;
- default:
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK),
gShellLevel2HiiHandle, Status);
- ShellStatus = SHELL_UNSUPPORTED;
+ if (Status == EFI_ACCESS_DENIED) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),
gShellLevel2HiiHandle);
+ ShellStatus = SHELL_ACCESS_DENIED;
+ } else if (Status == EFI_NOT_FOUND) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF),
gShellLevel2HiiHandle, SName);
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ } else {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK),
gShellLevel2HiiHandle, Status);
+ ShellStatus = SHELL_UNSUPPORTED;
}
}
} else {
Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c 2013-05-12
23:56:35 UTC (rev 14351)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c 2013-05-13
02:36:09 UTC (rev 14352)
@@ -1,7 +1,7 @@
/** @file
Main file for mv shell level 2 function.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2013, 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
@@ -404,23 +404,18 @@
//
if (EFI_ERROR(Status)) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK),
gShellLevel2HiiHandle, Status);
- //
- // move failed
- //
- switch(Status){
- default:
- ShellStatus = SHELL_INVALID_PARAMETER;
- case EFI_SECURITY_VIOLATION:
- ShellStatus = SHELL_SECURITY_VIOLATION;
- case EFI_WRITE_PROTECTED:
- ShellStatus = SHELL_WRITE_PROTECTED;
- case EFI_OUT_OF_RESOURCES:
- ShellStatus = SHELL_OUT_OF_RESOURCES;
- case EFI_DEVICE_ERROR:
- ShellStatus = SHELL_DEVICE_ERROR;
- case EFI_ACCESS_DENIED:
- ShellStatus = SHELL_ACCESS_DENIED;
- } // switch
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ if (Status == EFI_SECURITY_VIOLATION) {
+ ShellStatus = SHELL_SECURITY_VIOLATION;
+ } else if (Status == EFI_WRITE_PROTECTED) {
+ ShellStatus = SHELL_WRITE_PROTECTED;
+ } else if (Status == EFI_OUT_OF_RESOURCES) {
+ ShellStatus = SHELL_OUT_OF_RESOURCES;
+ } else if (Status == EFI_DEVICE_ERROR) {
+ ShellStatus = SHELL_DEVICE_ERROR;
+ } else if (Status == EFI_ACCESS_DENIED) {
+ ShellStatus = SHELL_ACCESS_DENIED;
+ }
} else {
ShellPrintEx(-1, -1, L"%s", HiiResultOk);
}
Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/GetMtc.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/GetMtc.c
2013-05-12 23:56:35 UTC (rev 14351)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel3CommandsLib/GetMtc.c
2013-05-13 02:36:09 UTC (rev 14352)
@@ -1,7 +1,7 @@
/** @file
Main file for GetMtc shell level 3 function.
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2009 - 2013, 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
@@ -70,17 +70,12 @@
// Get the monotonic counter count
//
Status = gBS->GetNextMonotonicCount(&Mtc);
- switch(Status) {
- case EFI_DEVICE_ERROR:
- ShellStatus = SHELL_DEVICE_ERROR;
- break;
- case EFI_SECURITY_VIOLATION:
- ShellStatus = SHELL_SECURITY_VIOLATION;
- break;
- default:
- if (EFI_ERROR(Status)) {
- ShellStatus = SHELL_DEVICE_ERROR;
- }
+ if (Status == EFI_DEVICE_ERROR) {
+ ShellStatus = SHELL_DEVICE_ERROR;
+ } else if (Status == EFI_SECURITY_VIOLATION) {
+ ShellStatus = SHELL_SECURITY_VIOLATION;
+ } else if (EFI_ERROR(Status)) {
+ ShellStatus = SHELL_DEVICE_ERROR;
}
//
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits