public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool
@ 2018-11-20  6:50 Lokesh B V
  2018-11-20  8:45 ` Jin, Eric
  2018-11-26 20:26 ` Supreeth Venkatesh
  0 siblings, 2 replies; 6+ messages in thread
From: Lokesh B V @ 2018-11-20  6:50 UTC (permalink / raw)
  To: edk2-devel, supreeth.venkatesh, eric.jin

Some windows editors uses "\r\n" for line feed. While processing uefi testcase
info file, the GenBin tool logic to skip line feed doesn't consider the presence
of carraige return(\r) in line feed. So this results in incorrect format error.

Signed-off-by: Lokesh B V <lokesh.bv@arm.com>
---
 uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c b/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c
index 61bb35b..ce271a1 100644
--- a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c
+++ b/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c
@@ -176,6 +176,7 @@ Trim (
   for (Index1 = 0; Index1 < Length; Index1++) {
     if ((String[Index1] != ' ' ) &&
         (String[Index1] != '\t') &&
+        (String[Index1] != '\r') &&
         (String[Index1] != '\n')) {
       break;
     }
@@ -193,6 +194,7 @@ Trim (
   for (Index1 = 0; Index1 < Length; Index1++) {
     if ((String[Length - 1 - Index1] != ' ' ) &&
         (String[Length - 1 - Index1] != '\t') &&
+        (String[Length - 1 - Index1] != '\r') &&
         (String[Length - 1 - Index1] != '\n')) {
       break;
     }
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-27 16:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20  6:50 [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool Lokesh B V
2018-11-20  8:45 ` Jin, Eric
2018-11-26 20:26 ` Supreeth Venkatesh
2018-11-27  8:04   ` Lokesh Belathur Veerappa
2018-11-27 14:37     ` Supreeth Venkatesh
2018-11-27 16:51       ` Lokesh Belathur Veerappa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox