mirror_edk2/MdeModulePkg/Library
Hao Wu 9e32e9719c MdeModulePkg/PrintLib: Add safe print functions [A|U]ValueToStringS
Add the following 2 APIs:
UnicodeValueToStringS
AsciiValueToStringS

These safe version APIs are used to enhance their counterpart (APIs
without trailing 'S' in function names).

They perform checks to the input parameters and will return relative
status to reflect the check result.

Return RETURN_INVALID_PARAMETER when:
1). The input Buffer is NULL.
2). The input BufferSize is greater than (PcdMaximumUnicodeStringLength *
sizeof (CHAR16) + 1) for UnicodeValueToStringS or greater than
PcdMaximumAsciiStringLength for AsciiValueToStringS.
3). The input Flags is not set properly.
4). The input Width is not smaller than MAXIMUM_VALUE_CHARACTERS.

Return RETURN_BUFFER_TOO_SMALL when:
1). The input BufferSize cannot hold the converted value.

These APIs in the MdeModulePkg/DxePrintLibPrint2Protocol instance
follow the same rules with MdePkg/BasePrintLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-02-21 13:56:39 +08:00
..
AuthVariableLibNull
BaseIpmiLibNull
BasePlatformHookLibNull
BaseResetSystemLibNull MdeModulePkg/BaseResetSystemLibNull: Implement ResetPlatformSpecific 2016-09-02 10:07:14 +08:00
BaseSerialPortLib16550
BaseSortLib
BootLogoLib MdeModulePkg/BootLogoLib: Remove invalid if judgments 2016-11-11 12:55:46 +08:00
BootMaintenanceManagerUiLib MdeModulePkg/BMMUI: add comments for function parameter 2016-11-15 09:36:03 +08:00
BootManagerUiLib MdeModulePkg/BootManagerUiLib: rebase to ARRAY_SIZE() 2016-10-27 11:10:56 +02:00
CpuExceptionHandlerLibNull MdeModulePkg/CpuExceptionHanderLibNull: RegisterCpuInterruptHandler() 2016-11-18 09:43:51 +08:00
CustomizedDisplayLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
DebugAgentLibNull MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
DeviceManagerUiLib
DxeCapsuleLibFmp MdeModulePkg/DxeCapsuleLibFmp: Fix incorrect MODULE_TYPE 2017-01-05 14:41:40 +08:00
DxeCapsuleLibNull MdeModulePkg/DxeCapsuleLibNull: Add ProcessCapsules() interface. 2016-11-08 22:36:58 +08:00
DxeCoreMemoryAllocationLib MdeModulePkg DxeCoreMemoryAllocationLib: Extend to support MemoryProfileLib 2016-07-01 09:39:58 +08:00
DxeCorePerformanceLib MdeModulePkg DxeCorePerformanceLib: Only support linking with DxeCore 2017-01-13 15:52:21 +08:00
DxeCrc32GuidedSectionExtractLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
DxeDebugPrintErrorLevelLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
DxeDpcLib
DxeFileExplorerProtocol
DxeHttpLib MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength 2017-02-09 08:33:21 +08:00
DxeIpIoLib MdeModulePkg: Update IP4 stack drivers for classless address unicast check. 2016-10-28 14:20:10 +08:00
DxeIpmiLibIpmiProtocol
DxeNetLib MdeModulePkg/DxeNetLib: Rewrite NetblockChecksum function logic 2016-12-22 16:17:19 +08:00
DxePerformanceLib
DxePrintLibPrint2Protocol MdeModulePkg/PrintLib: Add safe print functions [A|U]ValueToStringS 2017-02-21 13:56:39 +08:00
DxeReportStatusCodeLib
DxeSecurityManagementLib
DxeSmmPerformanceLib MdeModulePkg DxeSmmPerformanceLib: Add missing UefiLib in *.inf at de2459d 2016-06-29 12:54:53 +08:00
DxeTcpIoLib
DxeUdpIoLib
FileExplorerLib MdeModulePkg/FileExplorer: Enable functionality of creating new file/folder 2017-01-19 10:14:37 +08:00
FmpAuthenticationLibNull MdeModulePkg/FmpAuthenticationLibNull: Add NULL instance FMP. 2016-11-08 22:36:55 +08:00
FrameBufferBltLib MdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer 2017-01-24 15:06:39 +08:00
LockBoxNullLib
LzmaCustomDecompressLib MdeModulePkg LzmaDecompressLib: Update LZMA to new 16.04 version 2016-11-03 10:21:19 +08:00
NonDiscoverableDeviceRegistrationLib MdeModulePkg/NonDiscoverable: Compare SIZE_4GB with address type 2017-01-12 21:26:30 +08:00
OemHookStatusCodeLibNull
PciHostBridgeLibNull
PeiCrc32GuidedSectionExtractLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
PeiDebugPrintHobLib
PeiDxeDebugLibReportStatusCode
PeiIpmiLibIpmiPpi
PeiPerformanceLib
PeiRecoveryLibNull
PeiReportStatusCodeLib
PeiS3LibNull
PiDxeS3BootScriptLib MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes 2017-01-03 12:22:47 +01:00
PiSmmCoreMemoryAllocationLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
PiSmmCoreSmmServicesTableLib
PlatformBootManagerLibNull
PlatformHookLibSerialPortPpi
PlatformVarCleanupLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
RuntimeDxeReportStatusCodeLib
SmmCorePerformanceLib
SmmCorePlatformHookLibNull
SmmIpmiLibSmmIpmiProtocol
SmmLockBoxLib
SmmMemoryAllocationProfileLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
SmmPerformanceLib
SmmReportStatusCodeLib
TpmMeasurementLibNull
UefiBootManagerLib MdeModulePkg UefiBootManagerLib: Correct usages of GUID and Protocol 2017-02-16 10:56:28 +08:00
UefiHiiLib MdeModulePkg/Library: Fix typos in comments and variables 2016-10-27 09:11:19 +08:00
UefiHiiServicesLib
UefiMemoryAllocationProfileLib MdeModulePkg: Implement new library instance UefiMemoryAllocationProfileLib 2016-07-01 09:39:57 +08:00
UefiSortLib
VarCheckHiiLib MdeModulePkg/VarCheckHiiLib: rebase to ARRAY_SIZE() 2016-10-27 11:10:56 +02:00
VarCheckLib MdeModulePkg VarCheck: #### in L"Boot####" are upper case hex 2016-08-31 15:23:42 +08:00
VarCheckPcdLib
VarCheckUefiLib MdeModulePkg VarCheck: #### in L"Boot####" are upper case hex 2016-08-31 15:23:42 +08:00