]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/DebugLib: Print partial when format string is too long
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 11 Jan 2018 03:35:16 +0000 (11:35 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Mon, 15 Jan 2018 10:03:37 +0000 (18:03 +0800)
commit137ed15511e2045a7333e33ae7f1e873ce1961dd
tree9a7fa215621913169856dd774090889c09ad4826
parentcf9ff46b088a1df9c8ab81f31ef9606826ca7977
MdeModulePkg/DebugLib: Print partial when format string is too long

Today's implementation prints nothing when the format string cannot
fit in the report status extended data buffer.
It confuses user.
The patch changes to print partial message by truncating the format
string when it's too long.

The missing enhancement is the extended data buffer only reserves 96
bytes for the var-args. When the format string is not very long but
contains 13 %lx or %p, the var-args buffer is too small. Today's
implementation prints nothing for this case.
This patch doesn't change such behavior.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c