Add Missing invocations to VA_END() for VA_START().

Signed-off-by: rsun3
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12979 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3 2012-02-01 06:06:08 +00:00
parent 571e9831be
commit 3bbe68a362
28 changed files with 156 additions and 75 deletions

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -71,6 +71,7 @@ Returns:
AnInterface = NULL;
VA_START (args, Interface);
ProtocolFirst = VA_ARG (args, EFI_GUID *);
VA_END (args);
//
// Get list of all handles that support the first protocol.
@ -146,6 +147,8 @@ Returns:
);
}
VA_END (args);
goto lbl_out;
}
@ -163,6 +166,7 @@ Returns:
}
}
VA_END (args);
}
//

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -416,8 +416,7 @@ Returns:
EFI_SIMPLE_TEXT_OUT_PROTOCOL *Sto;
EFI_STATUS Status;
VA_LIST Args;
VA_START (Args, Fmt);
UINTN LengthOfPrinted;
Handle = gST->ConsoleOutHandle;
@ -454,7 +453,10 @@ Returns:
return 0;
}
return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);
VA_START (Args, Fmt);
LengthOfPrinted = _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);
VA_END (Args);
return LengthOfPrinted;
}

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -390,8 +390,7 @@ Returns:
EFI_SIMPLE_TEXT_OUT_PROTOCOL *Sto;
EFI_STATUS Status;
VA_LIST Args;
VA_START (Args, Fmt);
UINTN LengthOfPrinted;
Handle = gST->ConsoleOutHandle;
@ -428,7 +427,10 @@ Returns:
return 0;
}
return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);
VA_START (Args, Fmt);
LengthOfPrinted = _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);
VA_END (Args);
return LengthOfPrinted;
}

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2012, 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
@ -508,6 +508,7 @@ Returns:
StackString = VA_ARG (Marker, CHAR16 *);
if (StackString == NULL) {
VA_END (Marker);
return EFI_INVALID_PARAMETER;
}
@ -517,6 +518,7 @@ Returns:
LargestString = StringLen;
}
}
VA_END (Marker);
if ((LargestString + 2) > DimensionsWidth) {
LargestString = DimensionsWidth - 2;
@ -682,6 +684,7 @@ ExtractDefault(
BufferPos += Width;
if ((UINTN)(Offset + Width) > *BufferSize) {
VA_END (Args);
return EFI_BUFFER_TOO_SMALL;
}
@ -1025,6 +1028,7 @@ ConstructConfigAltResp (
BufToHexString (StringPtr + 8, &StrBufferLen, (UINT8 *) &AltCfgId, sizeof (UINT16));
Status = ExtractBlockConfig (DefaultValueArray, &AltCfg[Index]);
if (EFI_ERROR (Status)) {
VA_END (Args);
return Status;
}
AltRespLen += EfiStrLen (AltCfg[Index]);

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -65,6 +65,7 @@ SwitchStack (
InternalSwitchStack (EntryPoint, Context1, Context2, NewStack, Marker);
VA_END (Marker);
//
// InternalSwitchStack () will never return
//

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -601,9 +601,12 @@ BasePrintLibSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return BasePrintLibVSPrint (StartOfBuffer, BufferSize, Flags, FormatString, Marker);
NumberOfPrinted = BasePrintLibVSPrint (StartOfBuffer, BufferSize, Flags, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -696,9 +699,12 @@ UnicodeSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -789,9 +795,12 @@ UnicodeSPrintAsciiFormat (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -933,9 +942,12 @@ AsciiSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -1026,9 +1038,12 @@ AsciiSPrintUnicodeFormat (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -143,6 +143,8 @@ Returns:
Status = RegisterEsalFunction (FunctionId, ClassGuid, Function, ModuleGlobal);
}
VA_END (Args);
if (EFI_ERROR (Status)) {
return Status;
}

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2005, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -113,6 +113,7 @@ Returns:
VA_START (Marker, Format);
EfiDebugVPrintWorker (ErrorLevel, Format, Marker, sizeof (Buffer), Buffer);
VA_END (Marker);
//
// We choose NOT to use PEI_REPORT_STATUS_CODE here, because when debug is enable,
@ -127,5 +128,4 @@ Returns:
(EFI_STATUS_CODE_DATA *) Buffer
);
return ;
}

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -311,6 +311,8 @@ Returns:
Status = RegisterEsalFunction (FunctionId, ClassGuid, Function, ModuleGlobal);
}
VA_END (Args);
if (EFI_ERROR (Status)) {
return Status;
}

View File

@ -1,6 +1,6 @@
/*++ @file
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -911,14 +911,10 @@ Returns:
//
// Check input parameters
//
if (NumOfLba == 0) {
if (NumOfLba == 0 || (StartingLba + NumOfLba) > NumOfBlocks) {
VA_END (args);
return EFI_INVALID_PARAMETER;
}
if ((StartingLba + NumOfLba) > NumOfBlocks) {
return EFI_INVALID_PARAMETER;
}
} while (1);
VA_END (args);

View File

@ -4,7 +4,7 @@
Note that if the debug message length is larger than the maximum allowable
record length, then the debug message will be ignored directly.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -207,6 +207,7 @@ DebugPrint (
// If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then return
//
if ((CHAR8 *)BaseListMarker > FormatString) {
VA_END (VaListMarker);
return;
}
}

View File

@ -2,7 +2,7 @@
Mde UEFI library API implementation.
Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE
Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2012, 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
@ -623,6 +623,8 @@ PrintXY (
PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);
VA_END (Marker);
ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);
FreePool (Buffer);
@ -699,6 +701,8 @@ AsciiPrintXY (
PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker);
VA_END (Marker);
ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);
FreePool (Buffer);

View File

@ -6,7 +6,7 @@
protocol related to this implementation, not in the public spec. So, this
library instance is only for this code base.
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2012, 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
@ -366,9 +366,12 @@ UnicodeSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -515,9 +518,12 @@ UnicodeSPrintAsciiFormat (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -714,9 +720,12 @@ AsciiSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -863,9 +872,12 @@ AsciiSPrintUnicodeFormat (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
@ -1056,9 +1068,12 @@ InternalPrintLibSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return InternalPrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);
NumberOfPrinted = InternalPrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);
VA_END (Marker);
return NumberOfPrinted;
}
#define WARNING_STATUS_NUMBER 4

View File

@ -2,7 +2,7 @@
This module contains EBC support routines that are customized based on
the target processor.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -134,6 +134,7 @@ EbcInterpret (
Arg14 = VA_ARG (List, UINT64);
Arg15 = VA_ARG (List, UINT64);
Arg16 = VA_ARG (List, UINT64);
VA_END (List);
//
// Now clear out our context
//

View File

@ -15,7 +15,7 @@ type:
'%' - Print a %
Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2012, 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
@ -152,9 +152,12 @@ ConsolePrint (
)
{
VA_LIST Args;
UINTN LengthOfPrinted;
VA_START (Args, Fmt);
return PrintInternal ((UINTN) -1, (UINTN) -1, gST->ConOut, Fmt, Args);
LengthOfPrinted = PrintInternal ((UINTN) -1, (UINTN) -1, gST->ConOut, Fmt, Args);
VA_END (Args);
return LengthOfPrinted;
}
@ -216,9 +219,12 @@ PrintAt (
)
{
VA_LIST Args;
UINTN LengthOfPrinted;
VA_START (Args, Fmt);
return PrintInternal (Column, Row, gST->ConOut, Fmt, Args);
LengthOfPrinted = PrintInternal (Column, Row, gST->ConOut, Fmt, Args);
VA_END (Args);
return LengthOfPrinted;
}

View File

@ -852,8 +852,6 @@ CreateDialog (
ASSERT (TempString);
ASSERT (BufferedString);
VA_START (Marker, KeyValue);
//
// Zero the outgoing buffer
//
@ -875,6 +873,8 @@ CreateDialog (
LargestString = 0;
VA_START (Marker, KeyValue);
//
// Determine the largest string in the dialog box
// Notice we are starting with 1 since String is the first string

View File

@ -1,7 +1,7 @@
/** @file
Base Print Library instance implementation.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -165,9 +165,12 @@ UnicodeSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -306,9 +309,12 @@ UnicodeSPrintAsciiFormat (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -496,9 +502,12 @@ AsciiSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
/**
@ -637,9 +646,12 @@ AsciiSPrintUnicodeFormat (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}

View File

@ -1,7 +1,7 @@
/** @file
Print Library internal worker functions.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -982,7 +982,10 @@ BasePrintLibSPrint (
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);
NumberOfPrinted = BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);
VA_END (Marker);
return NumberOfPrinted;
}

View File

@ -1,7 +1,7 @@
/** @file
The library implements the Extended SAL Library Class for boot service only modules.
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2012, 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
@ -196,6 +196,8 @@ RegisterEsalClass (
Status = RegisterEsalFunction (FunctionId, ClassGuidLo, ClassGuidHi, Function, ModuleGlobal);
}
VA_END (Args);
if (EFI_ERROR (Status)) {
return Status;
}

View File

@ -1,7 +1,7 @@
/** @file
This library implements the Extended SAL Library Class for use in boot services and runtime.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -319,6 +319,8 @@ RegisterEsalClass (
Status = RegisterEsalFunction (FunctionId, ClassGuidLo, ClassGuidHi, Function, ModuleGlobal);
}
VA_END (Args);
if (EFI_ERROR (Status)) {
return Status;
}

View File

@ -2,7 +2,7 @@
Mde UEFI library API implementation.
Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2012, 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
@ -623,6 +623,8 @@ PrintXY (
PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);
VA_END (Marker);
ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);
FreePool (Buffer);
@ -699,6 +701,8 @@ AsciiPrintXY (
PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker);
VA_END (Marker);
ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);
FreePool (Buffer);
@ -796,7 +800,11 @@ CatSPrint (
)
{
VA_LIST Marker;
CHAR16 *NewString;
VA_START (Marker, FormatString);
return (CatVSPrint(String, FormatString, Marker));
NewString = CatVSPrint(String, FormatString, Marker);
VA_END (Marker);
return NewString;
}

View File

@ -1,6 +1,6 @@
/**@file
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -950,14 +950,10 @@ Returns:
//
// Check input parameters
//
if (NumOfLba == 0) {
if (NumOfLba == 0 || (StartingLba + NumOfLba) > NumOfBlocks) {
VA_END (args);
return EFI_INVALID_PARAMETER;
}
if ((StartingLba + NumOfLba) > NumOfBlocks) {
return EFI_INVALID_PARAMETER;
}
} while (1);
VA_END (args);

View File

@ -1,6 +1,6 @@
/**@file
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -123,6 +123,8 @@ SecPrint (
_vsnprintf (Buffer, sizeof (Buffer), Format, Marker);
va_end (Marker);
CharCount = strlen (Buffer);
WriteFile (
GetStdHandle (STD_OUTPUT_HANDLE),

View File

@ -2,7 +2,7 @@
Firmware Block Services to support emulating non-volatile variables
by pretending that a memory buffer is storage for the NV variables.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -379,6 +379,7 @@ FvbProtocolEraseBlocks (
);
VA_START (args, This);
PlatformFvbBlocksErased (This, args);
VA_END (args);
}
return EFI_SUCCESS;

View File

@ -1,7 +1,7 @@
/** @file
Utility functions used by the Dp application.
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2012, 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
@ -421,6 +421,8 @@ PrintToken (
SetMem( mPrintTokenBuffer, BufferSize, 0);
Return = UnicodeVSPrint (mPrintTokenBuffer, BufferSize, StringPtr, Marker);
VA_END (Marker);
if (Return > 0 && gST->ConOut != NULL) {
gST->ConOut->OutputString (gST->ConOut, mPrintTokenBuffer);
}

View File

@ -1,7 +1,7 @@
/** @file
TIS (TPM Interface Specification) functions used by TPM Dxe driver.
Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 2012, 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
@ -376,7 +376,7 @@ TisPcExecute (
if (*Fmt == '/') break;
Status = TisPcSendV (*Fmt, &Ap, TpmCommandBuf, &BufSize);
if (EFI_ERROR( Status )) {
return Status;
goto Error;
}
Fmt++;
}
@ -389,7 +389,7 @@ TisPcExecute (
// Ensure the TPM state change from "Reception" to "Idle/Ready"
//
MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);
return Status;
goto Error;
}
MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_GO);
@ -404,7 +404,7 @@ TisPcExecute (
//
MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);
if (EFI_ERROR (Status)) {
return Status;
goto Error;
}
//
@ -418,14 +418,16 @@ TisPcExecute (
}
Status = TisPcReceiveV (*Fmt, &Ap, TpmCommandBuf, &BufSize, ResponseSize, &DataFinished);
if (EFI_ERROR (Status)) {
return Status;
goto Error;
}
if (DataFinished) {
VA_END (Ap);
return EFI_SUCCESS;
}
Fmt++;
}
Error:
VA_END (Ap);
return Status;
}

View File

@ -1,7 +1,7 @@
/** @file
Provides interface to EFI_FILE_HANDLE functionality.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved. <BR>
Copyright (c) 2006 - 2012, 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
@ -1089,8 +1089,6 @@ FileHandlePrintLine(
CHAR16 *Buffer;
EFI_STATUS Status;
VA_START (Marker, Format);
//
// Get a buffer to print into
//
@ -1100,7 +1098,9 @@ FileHandlePrintLine(
//
// Print into our buffer
//
VA_START (Marker, Format);
UnicodeVSPrint (Buffer, PcdGet16 (PcdShellPrintBufferSize), Format, Marker);
VA_END (Marker);
//
// Print buffer into file

View File

@ -1,6 +1,6 @@
/*++
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, 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
@ -918,14 +918,10 @@ Returns:
//
// Check input parameters
//
if (NumOfLba == 0) {
if (NumOfLba == 0 || (StartingLba + NumOfLba) > NumOfBlocks) {
VA_END (args);
return EFI_INVALID_PARAMETER;
}
if ((StartingLba + NumOfLba) > NumOfBlocks) {
return EFI_INVALID_PARAMETER;
}
} while (1);
VA_END (args);