BaseMemoryLib (BaseMemoryLibRepStr):

Fix a logic error in SetMem64 (); The correct stride should be 8 instead of 4.
	BasePrintLib:
	Fix Printf(“%\n”) passer error.
	Fix BufferSize = 0, 1 issue
	Fix some missing ASSERT ()s
	Move MAXIMUM_VALUE_CHARACTERS from PrintLibInternal.h to PrintLib.h
	ReportStatusCodeLib:
	Add CONST modifier to some interfaces
	Modify 
	DebugLib:
	Replace some Unicode in comments.
	PeiServicesTablePointerLib
	Add ASSERT()s
	PciLib:
	Remove unnecessary ASSERT()s in PciRead/WriteBuffer()


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@496 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2006-06-13 06:31:11 +00:00
parent ad82307c75
commit 8960cdebac
21 changed files with 147 additions and 168 deletions

View File

@@ -66,7 +66,6 @@ static CONST STATUS_LOOKUP_TABLE_ENTRY StatusString[] = {
@param Buffer Character buffer to print the results of the parsing
of Format into.
@param BufferSize Maximum number of characters to put into buffer.
Zero means no limit.
@param Flags Intial flags value.
Can only have FORMAT_UNICODE and OUTPUT_UNICODE set
@param Format Null-terminated format string.
@@ -110,6 +109,9 @@ BasePrintLibVSPrint (
UINTN Radix;
RETURN_STATUS Status;
if (BufferSize == 0) {
return 0;
}
ASSERT (Buffer != NULL);
ASSERT (Format != NULL);
@@ -130,7 +132,6 @@ BasePrintLibVSPrint (
//
// Reserve space for the Null terminator.
// If BufferSize is 0, this will set BufferSize to the max unsigned value
//
BufferSize--;
@@ -338,7 +339,7 @@ BasePrintLibVSPrint (
} else {
BasePrintLibSPrint (
ValueBuffer,
0,
MAXIMUM_VALUE_CHARACTERS,
0,
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
TmpGuid->Data1,
@@ -364,7 +365,7 @@ BasePrintLibVSPrint (
} else {
BasePrintLibSPrint (
ValueBuffer,
0,
MAXIMUM_VALUE_CHARACTERS,
0,
"%02d/%02d/%04d %02d:%02d",
TmpTime->Month,
@@ -386,10 +387,14 @@ BasePrintLibVSPrint (
}
}
if (ArgumentString == ValueBuffer) {
BasePrintLibSPrint ((CHAR8 *) ValueBuffer, 0, 0, "%08X", Status);
BasePrintLibSPrint ((CHAR8 *) ValueBuffer, MAXIMUM_VALUE_CHARACTERS, 0, "%08X", Status);
}
break;
case '\n':
ArgumentString = "\r\n";
break;
case '%':
default:
//
@@ -400,9 +405,6 @@ BasePrintLibVSPrint (
break;
}
break;
case '\n':
ArgumentString = "\r\n";
break;
default:
ArgumentString = (CHAR8 *)&FormatCharacter;
Flags |= ARGUMENT_UNICODE;
@@ -717,7 +719,7 @@ UnicodeSPrintAsciiFormat (
VA_LIST Marker;
VA_START (Marker, FormatString);
return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize >> 1, FormatString, Marker);
return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
}
/**