Hi Ming, Agree the change, the caller should own the responsibility to format the string in the input parameter, driver should not append "\r\n" here.
Reviewed-by: Eric Dong <eric.d...@intel.com> Next time, please Cc the Package maintainer when send the patch. The maintainer info can be found in Maintainers.txt in the root of edk2 folder. Thanks, Eric > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tan, > Ming > Sent: Monday, June 8, 2020 7:16 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do > not output \n\r for string data > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2787 > > When output string data through serial port, will not ouput \n\r now. > Caller can output several data in one line, and output \n\r when needed. > > Signed-off-by: Ming Tan <ming....@intel.com> > --- > .../Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c | 2 +- > .../StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c | 2 +- > .../Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork > er.c > b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork > er.c > index 2455f8b2a9..3aa5642b64 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork > er.c > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork > e > +++ r.c > @@ -134,7 +134,7 @@ SerialStatusCodeReportWorker ( > CharCount = AsciiSPrint ( Buffer, > sizeof (Buffer),- > "%a\n\r",+ "%a", > ((EFI_STATUS_CODE_STRING_DATA *) > Data)->String.Ascii ); } else {diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC > odeWorker.c > b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC > odeWorker.c > index 2dc3ecfff5..0b98e7ec63 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC > odeWorker.c > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC > o > +++ deWorker.c > @@ -129,7 +129,7 @@ SerialStatusCodeReportWorker ( > CharCount = AsciiSPrint ( Buffer, > sizeof (Buffer),- > "%a\n\r",+ "%a", > ((EFI_STATUS_CODE_STRING_DATA *) > Data)->String.Ascii ); } else {diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo > rker.c > b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo > rker.c > index c0c907b32f..3df0a67126 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo > rker.c > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo > rke > +++ r.c > @@ -129,7 +129,7 @@ SerialStatusCodeReportWorker ( > CharCount = AsciiSPrint ( Buffer, > sizeof (Buffer),- > "%a\n\r",+ "%a", > ((EFI_STATUS_CODE_STRING_DATA *) > Data)->String.Ascii ); } else {-- > 2.24.0.windows.2 > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#60857): https://edk2.groups.io/g/devel/message/60857 > Mute This Topic: https://groups.io/mt/74749510/1768733 > Group Owner: devel+ow...@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [eric.d...@intel.com] - > =-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60927): https://edk2.groups.io/g/devel/message/60927 Mute This Topic: https://groups.io/mt/74749510/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-