* [PATCH 1/1 v2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data
@ 2020-06-15 2:03 Tan, Ming
2020-06-15 3:25 ` [edk2-devel] " Dong, Eric
2020-06-17 2:46 ` Wang, Jian J
0 siblings, 2 replies; 3+ messages in thread
From: Tan, Ming @ 2020-06-15 2:03 UTC (permalink / raw)
To: devel
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.tan@intel.com>
---
V2: Make it as a standalone patch.
.../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/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
index 2455f8b2a908..3aa5642b64fb 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.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/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
index 2dc3ecfff52e..0b98e7ec6315 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.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/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
index c0c907b32f5a..3df0a6712611 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH 1/1 v2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data
2020-06-15 2:03 [PATCH 1/1 v2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Tan, Ming
@ 2020-06-15 3:25 ` Dong, Eric
2020-06-17 2:46 ` Wang, Jian J
1 sibling, 0 replies; 3+ messages in thread
From: Dong, Eric @ 2020-06-15 3:25 UTC (permalink / raw)
To: devel@edk2.groups.io, Tan, Ming
Reviewed-by: Eric Dong <eric.dong@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tan,
> Ming
> Sent: Monday, June 15, 2020 10:04 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 1/1 v2] 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.tan@intel.com>
> ---
> V2: Make it as a standalone patch.
> .../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 2455f8b2a908..3aa5642b64fb 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork
> er.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork
> er.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 2dc3ecfff52e..0b98e7ec6315 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC
> odeWorker.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC
> odeWorker.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 c0c907b32f5a..3df0a6712611 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo
> rker.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo
> rker.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
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH 1/1 v2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data
2020-06-15 2:03 [PATCH 1/1 v2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Tan, Ming
2020-06-15 3:25 ` [edk2-devel] " Dong, Eric
@ 2020-06-17 2:46 ` Wang, Jian J
1 sibling, 0 replies; 3+ messages in thread
From: Wang, Jian J @ 2020-06-17 2:46 UTC (permalink / raw)
To: devel@edk2.groups.io, Tan, Ming
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Regards,
Jian
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tan, Ming
> Sent: Monday, June 15, 2020 10:04 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 1/1 v2] 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.tan@intel.com>
> ---
> V2: Make it as a standalone patch.
> .../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/SerialStatusCodeWorker.c
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
> index 2455f8b2a908..3aa5642b64fb 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.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/SerialStatusCode
> Worker.c
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCode
> Worker.c
> index 2dc3ecfff52e..0b98e7ec6315 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCode
> Worker.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCode
> Worker.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/SerialStatusCodeWorker.
> c
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.
> c
> index c0c907b32f5a..3df0a6712611 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.
> c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.
> 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
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-17 2:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-15 2:03 [PATCH 1/1 v2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Tan, Ming
2020-06-15 3:25 ` [edk2-devel] " Dong, Eric
2020-06-17 2:46 ` Wang, Jian J
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox