Update Code to pass EBC compiler.

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
This commit is contained in:
lgao4 2013-05-13 02:36:09 +00:00
parent e359565ec2
commit cbcccd2c9d
12 changed files with 83 additions and 88 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Floppy Peim to support Recovery function from Floppy device. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions are licensed and made available under the terms and conditions
@ -1018,22 +1018,12 @@ DiscoverFdcDevice (
// Check Media // Check Media
// //
Status = DisketChanged (FdcBlkIoDev, Info); Status = DisketChanged (FdcBlkIoDev, Info);
switch (Status) { if (Status == EFI_NO_MEDIA) {
case EFI_NO_MEDIA:
// //
// No diskette in floppy. // No diskette in floppy.
// //
MediaInfo->MediaPresent = FALSE; MediaInfo->MediaPresent = FALSE;
break; } else if (Status != EFI_MEDIA_CHANGED && Status != EFI_SUCCESS) {
case EFI_MEDIA_CHANGED:
case EFI_SUCCESS:
//
// Diskette exists in floppy.
//
break;
default:
// //
// EFI_DEVICE_ERROR // EFI_DEVICE_ERROR
// //

View File

@ -3,7 +3,7 @@
# #
# This file is used to build all modules in IntelFrameworkModulePkg. # 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 #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 terms and conditions of the BSD License that accompanies this distribution.
#The full text of the license may be found at #The full text of the license may be found at
@ -80,6 +80,9 @@
PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
[LibraryClasses.EBC.PEIM]
IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf
[LibraryClasses.common.DXE_DRIVER] [LibraryClasses.common.DXE_DRIVER]
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf

View File

@ -1,7 +1,7 @@
## @file ## @file
# EFI/PI Reference Module Package for All Architectures # 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 # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -151,6 +151,8 @@
# #
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
[LibraryClasses.EBC]
LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
[PcdsFeatureFlag] [PcdsFeatureFlag]
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE
@ -242,8 +244,6 @@
MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf
MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
@ -336,6 +336,8 @@
MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf
MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf

View File

@ -5,7 +5,7 @@
for Firmware Basic Boot Performance Record and other boot performance records, for Firmware Basic Boot Performance Record and other boot performance records,
and install FPDT to ACPI table. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -238,7 +238,7 @@ InstallFirmwarePerformanceDataTable (
EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol; EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol;
EFI_PHYSICAL_ADDRESS Address; EFI_PHYSICAL_ADDRESS Address;
UINTN Size; UINTN Size;
UINT8 SmmBootRecordCommBuffer[SMM_BOOT_RECORD_COMM_SIZE]; UINT8 *SmmBootRecordCommBuffer;
EFI_SMM_COMMUNICATE_HEADER *SmmCommBufferHeader; EFI_SMM_COMMUNICATE_HEADER *SmmCommBufferHeader;
SMM_BOOT_RECORD_COMMUNICATE *SmmCommData; SMM_BOOT_RECORD_COMMUNICATE *SmmCommData;
UINTN CommSize; UINTN CommSize;
@ -259,6 +259,8 @@ InstallFirmwarePerformanceDataTable (
// //
// Collect boot records from SMM drivers. // Collect boot records from SMM drivers.
// //
SmmBootRecordCommBuffer = AllocateZeroPool (SMM_BOOT_RECORD_COMM_SIZE);
ASSERT (SmmBootRecordCommBuffer != NULL);
SmmCommData = NULL; SmmCommData = NULL;
Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &Communication); Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &Communication);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
@ -294,6 +296,7 @@ InstallFirmwarePerformanceDataTable (
ASSERT_EFI_ERROR(SmmCommData->ReturnStatus); ASSERT_EFI_ERROR(SmmCommData->ReturnStatus);
} }
} }
FreePool (SmmBootRecordCommBuffer);
// //
// Prepare memory for runtime Performance Record. // Prepare memory for runtime Performance Record.

View File

@ -1,7 +1,7 @@
/** @file /** @file
The driver binding for IP4 CONFIG protocol. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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> which accompanies this distribution. The full text of the license may be found at<BR>
@ -71,7 +71,7 @@ IP4_CONFIG_INSTANCE mIp4ConfigTemplate = {
NULL, NULL,
NULL, NULL,
NULL, NULL,
EFI_NOT_READY, 0,
{ {
0, 0,
0, 0,
@ -109,6 +109,8 @@ Ip4ConfigDriverEntryPoint (
IN EFI_SYSTEM_TABLE *SystemTable IN EFI_SYSTEM_TABLE *SystemTable
) )
{ {
mIp4ConfigTemplate.Result = EFI_NOT_READY;
return EfiLibInstallDriverBindingComponentName2 ( return EfiLibInstallDriverBindingComponentName2 (
ImageHandle, ImageHandle,
SystemTable, SystemTable,

View File

@ -1,7 +1,7 @@
## @file ## @file
# UEFI 2.2 Network Module Package for All Architectures # 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 # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -85,17 +85,18 @@
################################################################################################### ###################################################################################################
[Components] [Components]
NetworkPkg/IpSecDxe/IpSecDxe.inf
NetworkPkg/Ip6Dxe/Ip6Dxe.inf NetworkPkg/Ip6Dxe/Ip6Dxe.inf
NetworkPkg/TcpDxe/TcpDxe.inf NetworkPkg/TcpDxe/TcpDxe.inf
NetworkPkg/Udp6Dxe/Udp6Dxe.inf NetworkPkg/Udp6Dxe/Udp6Dxe.inf
NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
[Components.IA32, Components.X64, Components.IPF]
NetworkPkg/IScsiDxe/IScsiDxe.inf
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
NetworkPkg/Application/Ping6/Ping6.inf
NetworkPkg/Application/IfConfig6/IfConfig6.inf NetworkPkg/Application/IfConfig6/IfConfig6.inf
NetworkPkg/Application/IpsecConfig/IpSecConfig.inf NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
NetworkPkg/Application/VConfig/VConfig.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

View File

@ -6,7 +6,7 @@
# Option ROM image for all CPU architectures, including EBC target. # 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. # 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 # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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/FrameBufferBltLib/FrameBufferBltLib.inf
OptionRomPkg/Library/GopBltLib/GopBltLib.inf OptionRomPkg/Library/GopBltLib/GopBltLib.inf
OptionRomPkg/Application/BltLibSample/BltLibSample.inf
OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf OptionRomPkg/AtapiPassThruDxe/AtapiPassThruDxe.inf
OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf
OptionRomPkg/UndiRuntimeDxe/UndiRuntimeDxe.inf OptionRomPkg/UndiRuntimeDxe/UndiRuntimeDxe.inf
[Components.IA32, Components.X64, Components.IPF]
OptionRomPkg/Application/BltLibSample/BltLibSample.inf

View File

@ -1,7 +1,7 @@
## @file ## @file
# Build description file to generate Shell DP application. # 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 # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
@ -70,6 +70,9 @@
PalLib|MdePkg/Library/UefiPalLib/UefiPalLib.inf PalLib|MdePkg/Library/UefiPalLib/UefiPalLib.inf
TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
[LibraryClasses.EBC]
TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
[Components.IA32, Components.X64] [Components.IA32, Components.X64]
PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.inf PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.inf
PerformancePkg/Library/TscTimerLib/PeiTscTimerLib.inf PerformancePkg/Library/TscTimerLib/PeiTscTimerLib.inf

View File

@ -1,7 +1,7 @@
## @file ## @file
# Security Module Package for All Architectures. # 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 # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
@ -92,8 +92,6 @@
SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthenticationStatusLib.inf SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthenticationStatusLib.inf
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderDxe.inf
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderDxe.inf
# #
# Application # Application
@ -104,29 +102,35 @@
# TPM # TPM
# #
SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf
SecurityPkg/Tcg/TcgPei/TcgPei.inf SecurityPkg/Library/TpmCommLib/TpmCommLib.inf
SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf
SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.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/TcgConfigDxe/TcgConfigDxe.inf { SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf {
<LibraryClasses> <LibraryClasses>
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
} }
SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
[Components.IA32, Components.X64] [Components.IA32, Components.X64]
SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf
SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.inf SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.inf
SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.inf SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.inf
SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
[Components.IPF] [Components.IPF]
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/EsalVariableDxeSal.inf SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/EsalVariableDxeSal.inf
[Components.EBC]
# Build only
SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf
[BuildOptions] [BuildOptions]
MSFT:*_*_IA32_DLINK_FLAGS = /ALIGN:256 MSFT:*_*_IA32_DLINK_FLAGS = /ALIGN:256
INTEL:*_*_IA32_DLINK_FLAGS = /ALIGN:256 INTEL:*_*_IA32_DLINK_FLAGS = /ALIGN:256

View File

@ -1,7 +1,7 @@
/** @file /** @file
Main file for map shell level 2 command. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -1091,18 +1091,15 @@ ShellCommandRunMap (
if (SName != NULL) { if (SName != NULL) {
Status = PerformMappingDelete(SName); Status = PerformMappingDelete(SName);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
switch (Status) { if (Status == EFI_ACCESS_DENIED) {
case EFI_ACCESS_DENIED: ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle); ShellStatus = SHELL_ACCESS_DENIED;
ShellStatus = SHELL_ACCESS_DENIED; } else if (Status == EFI_NOT_FOUND) {
break; ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName);
case EFI_NOT_FOUND: ShellStatus = SHELL_INVALID_PARAMETER;
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName); } else {
ShellStatus = SHELL_INVALID_PARAMETER; ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);
break; ShellStatus = SHELL_UNSUPPORTED;
default:
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);
ShellStatus = SHELL_UNSUPPORTED;
} }
} }
} else { } else {

View File

@ -1,7 +1,7 @@
/** @file /** @file
Main file for mv shell level 2 function. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -404,23 +404,18 @@ ValidateAndMoveFiles(
// //
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status); ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);
// ShellStatus = SHELL_INVALID_PARAMETER;
// move failed if (Status == EFI_SECURITY_VIOLATION) {
// ShellStatus = SHELL_SECURITY_VIOLATION;
switch(Status){ } else if (Status == EFI_WRITE_PROTECTED) {
default: ShellStatus = SHELL_WRITE_PROTECTED;
ShellStatus = SHELL_INVALID_PARAMETER; } else if (Status == EFI_OUT_OF_RESOURCES) {
case EFI_SECURITY_VIOLATION: ShellStatus = SHELL_OUT_OF_RESOURCES;
ShellStatus = SHELL_SECURITY_VIOLATION; } else if (Status == EFI_DEVICE_ERROR) {
case EFI_WRITE_PROTECTED: ShellStatus = SHELL_DEVICE_ERROR;
ShellStatus = SHELL_WRITE_PROTECTED; } else if (Status == EFI_ACCESS_DENIED) {
case EFI_OUT_OF_RESOURCES: ShellStatus = SHELL_ACCESS_DENIED;
ShellStatus = SHELL_OUT_OF_RESOURCES; }
case EFI_DEVICE_ERROR:
ShellStatus = SHELL_DEVICE_ERROR;
case EFI_ACCESS_DENIED:
ShellStatus = SHELL_ACCESS_DENIED;
} // switch
} else { } else {
ShellPrintEx(-1, -1, L"%s", HiiResultOk); ShellPrintEx(-1, -1, L"%s", HiiResultOk);
} }

View File

@ -1,7 +1,7 @@
/** @file /** @file
Main file for GetMtc shell level 3 function. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -70,17 +70,12 @@ ShellCommandRunGetMtc (
// Get the monotonic counter count // Get the monotonic counter count
// //
Status = gBS->GetNextMonotonicCount(&Mtc); Status = gBS->GetNextMonotonicCount(&Mtc);
switch(Status) { if (Status == EFI_DEVICE_ERROR) {
case EFI_DEVICE_ERROR: ShellStatus = SHELL_DEVICE_ERROR;
ShellStatus = SHELL_DEVICE_ERROR; } else if (Status == EFI_SECURITY_VIOLATION) {
break; ShellStatus = SHELL_SECURITY_VIOLATION;
case EFI_SECURITY_VIOLATION: } else if (EFI_ERROR(Status)) {
ShellStatus = SHELL_SECURITY_VIOLATION; ShellStatus = SHELL_DEVICE_ERROR;
break;
default:
if (EFI_ERROR(Status)) {
ShellStatus = SHELL_DEVICE_ERROR;
}
} }
// //