From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=eric.jin@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 70ADF21B02822 for ; Tue, 20 Nov 2018 00:45:09 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2018 00:45:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,256,1539673200"; d="scan'208";a="275397297" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 20 Nov 2018 00:45:08 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 20 Nov 2018 00:45:08 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 20 Nov 2018 00:45:07 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.214]) with mapi id 14.03.0415.000; Tue, 20 Nov 2018 16:45:06 +0800 From: "Jin, Eric" To: Lokesh B V , "edk2-devel@lists.01.org" , "supreeth.venkatesh@arm.com" CC: "Jin, Eric" Thread-Topic: [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool Thread-Index: AQHUgJ1UCo8OJWHlQUqzpxAQ63rePqVYWT5w Date: Tue, 20 Nov 2018 08:45:05 +0000 Message-ID: References: <1542696618-2284-1-git-send-email-lokesh.bv@arm.com> In-Reply-To: <1542696618-2284-1-git-send-email-lokesh.bv@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2018 08:45:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please don't forget to change the copyright info when commit patch. Reviewed-by: Eric Jin -----Original Message----- From: Lokesh B V =20 Sent: Tuesday, November 20, 2018 2:50 PM To: edk2-devel@lists.01.org; supreeth.venkatesh@arm.com; Jin, Eric Cc: Lokesh B V Subject: [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detecti= on by GenBin tool Some windows editors uses "\r\n" for line feed. While processing uefi testc= ase 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 --- 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 =3D 0; Index1 < Length; Index1++) { if ((String[Index1] !=3D ' ' ) && (String[Index1] !=3D '\t') && + (String[Index1] !=3D '\r') && (String[Index1] !=3D '\n')) { break; } @@ -193,6 +194,7 @@ Trim ( for (Index1 =3D 0; Index1 < Length; Index1++) { if ((String[Length - 1 - Index1] !=3D ' ' ) && (String[Length - 1 - Index1] !=3D '\t') && + (String[Length - 1 - Index1] !=3D '\r') && (String[Length - 1 - Index1] !=3D '\n')) { break; } -- 2.7.4