From nobody Sat Nov 2 14:24:40 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 148594257279421.547458065347655; Wed, 1 Feb 2017 01:49:32 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 29F9981FA6; Wed, 1 Feb 2017 01:49:30 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 7659181F99 for ; Wed, 1 Feb 2017 01:49:29 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 01 Feb 2017 01:49:29 -0800 Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.89.179]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2017 01:49:29 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,319,1477983600"; d="scan'208";a="59876486" From: Michael Kinney To: edk2-devel@lists.01.org Date: Wed, 1 Feb 2017 01:49:07 -0800 Message-Id: <1485942552-47388-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> References: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [staging/edk2-test PATCH V2 1/6] edk2-test: Update Readme.md X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Fish MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" * Add Supreeth Venkatesh to list of branch owners * Clean up environment variable for Windows builds * Add Linux Build Instructions Cc: Andrew Fish Cc: Supreeth Venkatesh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney Reviewed-by: Supreeth Venkatesh Tested-by: Supreeth Venkatesh --- Readme.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 4ca0ffa..c5cf1ff 100644 --- a/Readme.md +++ b/Readme.md @@ -3,8 +3,9 @@ edk2-staging branch for a test harness, test case SDK, and test cases for = the edk2 repository and platform firmware that is based on the edk2 repository. =20 -## **edk2-stagaing branch owners** +## **edk2-staging branch owners** * Michael Kinney +* Supreeth Venkatesh =20 ## **Features** * Test harness that runs from the UEFI Shell @@ -76,13 +77,13 @@ build output directory. =20 ```cmd git clone https://github.com/tianocore/edk2.git -git clone https://github.com/tianocore/edk2-staging.git --brach edk2-test +git clone https://github.com/tianocore/edk2-staging.git --branch edk2-test =20 set WORKSPACE=3D%CD% set EDK_TOOLS_PATH=3D%WORKSPACE%\edk2\BaseTools +set EDK_TOOLS_BIN=3D%EDK_TOOLS_PATH%\BinWrappers\WindowsLike set PACKAGES_PATH=3D%WORKSPACE%\edk2;%WORKSPACE%\edk2-staging -set EDK_TOOLS_BIN=3D%WORKSPACE%\BaseTools\BinWrappers\WindowsLike -path=3D%path%;%WORKSPACE%\edk2\BaseTools\Bin\Win32 +path=3D%path%;%EDK_TOOLS_PATH%\Bin\Win32 =20 cd edk2 edkSetup.bat @@ -93,6 +94,49 @@ build -a IA32 -a X64 -t VS2015x86 -p TestCasePkg/TestCas= ePkg.dsc =20 ## **Linux Build Instructions** =20 +### Pre-requisites + +* GIT client: Available from https://git-scm.com/downloads +* GCC 4.9 compiler or XCODE compiler + +Create a new directory for an EDK II WORKSPACE. + +The code block below shows the GIT clone operations required to pull the e= dk2 +repository, and the edk2-test branch from the edk2-staging repository. + +Next it sets environment variables that must be set before running +```edksetup.bat```. Since content is being pulled from multiple repositori= es, +the EDK II [Multiple Workspace]( +https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspace) +feature is used. + +Next, the ```edksetup.bat``` file is run to complete the initialization of= an +EDK II build environment. Two example build commands are shown. The firs= t one +in ```TestFrameworkPkg/TestFrameworkPkg.dsc``` builds a test harness and c= reates +an installer in the build output directory. The second one in +```TestCasePkg/TestCasePkg.dsc``` builds a sample test case using a test l= ibrary +from the ```TestFrameworkPkg``` and adds the test case to the installer in= the +build output directory. + +```cmd +git clone https://github.com/tianocore/edk2.git +git clone https://github.com/tianocore/edk2-staging.git --branch edk2-test + +export WORKSPACE=3D`pwd` +export EDK_TOOLS_PATH=3D"$WORKSPACE/edk2/BaseTools" +export PACKAGES_PATH=3D"$WORKSPACE/edk2:$WORKSPACE/edk2-staging" +export EDK_TOOLS_BIN=3D"$WORKSPACE/edk2/BaseTools/BinWrappers/PosixLike" +export CONF_PATH=3D"$WORKSPACE/edk2/Conf" +export PATH=3D"$PATH:$EDK_TOOLS_BIN" + +cd edk2 +make -C BaseTools +. edksetup.sh + +build -a IA32 -a X64 -t GCC49 -p TestFrameworkPkg/TestFrameworkPkg.dsc +build -a IA32 -a X64 -t GCC49 -p TestCasePkg/TestCasePkg.dsc +``` + ## **Installation Instructions** =20 * Copy the Build/SctPackage directory to media for the target platform --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:24:40 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1485942575549275.00408352859165; Wed, 1 Feb 2017 01:49:35 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 67AF281FAC; Wed, 1 Feb 2017 01:49:31 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 1AB6C81F9E for ; Wed, 1 Feb 2017 01:49:30 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 01 Feb 2017 01:49:29 -0800 Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.89.179]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2017 01:49:29 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,319,1477983600"; d="scan'208";a="59876487" From: Michael Kinney To: edk2-devel@lists.01.org Date: Wed, 1 Feb 2017 01:49:08 -0800 Message-Id: <1485942552-47388-3-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> References: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [staging/edk2-test PATCH V2 2/6] TestFrameworkPkg: Fix XCODE compatibility issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Fish MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Michael Kinney Cc: Supreeth Venkatesh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish Reviewed-by: Supreeth Venkatesh Tested-by: Supreeth Venkatesh --- TestFrameworkPkg/Eftp/EftpCommon.h | 2 +- TestFrameworkPkg/Eftp/EftpMain.c | 4 +- TestFrameworkPkg/Eftp/EftpMain.h | 8 +-- TestFrameworkPkg/Eftp/EftpOption.c | 36 +++++++------- TestFrameworkPkg/Eftp/EftpOption.h | 4 +- TestFrameworkPkg/Eftp/EftpPacket.c | 8 +-- TestFrameworkPkg/Eftp/EftpPacket.h | 4 +- TestFrameworkPkg/Eftp/EftpRRQ.c | 28 +++++++++-- TestFrameworkPkg/Eftp/EftpWRQ.c | 17 ++++++- TestFrameworkPkg/Include/Protocol/BbTest.h | 8 +-- TestFrameworkPkg/Include/Protocol/Eftp.h | 24 ++++----- .../Include/Protocol/EntsMonitorProtocol.h | 4 +- TestFrameworkPkg/Include/Protocol/LibPrivate.h | 12 ++--- .../Include/Protocol/StandardTestLibrary.h | 4 +- .../Include/Protocol/TestLoggingLibrary.h | 4 +- .../Include/Protocol/TestOutputLibrary.h | 4 +- .../Include/Protocol/TestProfileLibrary.h | 9 ++-- .../Include/Protocol/TestRecoveryLibrary.h | 4 +- TestFrameworkPkg/Include/Protocol/TslInit.h | 4 +- TestFrameworkPkg/Include/Protocol/WBTest.h | 8 +-- TestFrameworkPkg/InstallSct/InstallSct.c | 10 ++-- TestFrameworkPkg/Library/EasLib/EntsContext.c | 2 +- TestFrameworkPkg/Library/EasLib/EntsDpath.c | 2 +- TestFrameworkPkg/Library/EasLib/EntsLib.inf | 20 ++++---- TestFrameworkPkg/Library/EasLib/EntsMisc.c | 4 +- TestFrameworkPkg/Library/EasLib/EntsPrint.c | 6 +-- TestFrameworkPkg/Library/EasLib/EntsSupport.c | 41 ++++++++-------- TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c | 18 +++---- .../IP4NetworkMonitor/IP4NetworkMonitor.c | 8 +-- .../ManagedNetworkMonitor/ManagedNetworkMonitor.c | 8 +-- .../MonitorServices/SerialMonitor/SerialMonitor.c | 8 +-- .../PeiSctManageModule/PeiSctManageModule.c | 4 +- TestFrameworkPkg/Sct/Core/SctInit.c | 2 +- TestFrameworkPkg/Sct/Data/ApTest.c | 4 +- TestFrameworkPkg/Sct/Data/Category.c | 2 +- TestFrameworkPkg/Sct/Data/TestCase.c | 2 +- TestFrameworkPkg/Sct/Data/TestNode.c | 2 +- TestFrameworkPkg/Sct/DeviceConfig/DeviceConfig.c | 12 ++--- .../Sct/ENTS/EasDispatcher/Arg/EasArg.c | 2 +- .../Sct/ENTS/EasDispatcher/Core/EasInit.c | 6 +-- .../Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c | 6 +-- .../Sct/ENTS/EasDispatcher/Exec/EftpImplement.c | 17 +++---- .../Sct/ENTS/EasDispatcher/Load/EasSupportFile.c | 12 ++--- .../Sct/ENTS/EasDispatcher/Load/EasTestFile.c | 10 ++-- .../Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c | 16 +++--- TestFrameworkPkg/Sct/Execute/ExecuteSupport.c | 6 +-- TestFrameworkPkg/Sct/Execute/Reset.c | 6 +-- TestFrameworkPkg/Sct/Include/ApTest.h | 4 +- TestFrameworkPkg/Sct/Include/SctOutput.h | 4 +- TestFrameworkPkg/Sct/Load/SupportFile.c | 32 ++++++------ TestFrameworkPkg/Sct/Load/TestFile.c | 14 +++--- TestFrameworkPkg/Sct/Misc/SctMisc.c | 4 +- TestFrameworkPkg/Sct/Operation/Operation.c | 2 +- TestFrameworkPkg/Sct/Report/Report.c | 14 +++--- TestFrameworkPkg/Sct/Report/ReportConfig.c | 2 +- TestFrameworkPkg/Sct/Report/ReportDatabase.c | 14 +++--- TestFrameworkPkg/Sct/Report/ReportSupport.c | 10 ++-- TestFrameworkPkg/Sct/Report/ReportSupport.h | 8 +-- TestFrameworkPkg/Sct/UI/BuildMenu.c | 6 +-- TestFrameworkPkg/Sct/UI/ConfigMenu.c | 28 +++++------ TestFrameworkPkg/Sct/UI/FileDialog.c | 2 +- TestFrameworkPkg/Sct/UI/KeyFunction.c | 16 +++--- TestFrameworkPkg/Sct/UI/LogFileDialog.c | 2 +- TestFrameworkPkg/Sct/UI/TestNodeMenu.c | 6 +-- TestFrameworkPkg/Sct/UI/UI.h | 16 +++--- TestFrameworkPkg/Sct/print.c | 8 +-- .../Support/StandardTest/StandardTest.c | 57 ++----------------= ---- TestFrameworkPkg/Support/TestLogging/TestLogging.c | 8 +-- TestFrameworkPkg/Support/TestProfile/TestProfile.c | 14 +++--- .../Support/TestRecovery/TestRecovery.c | 6 +-- TestFrameworkPkg/TestFrameworkPkg.dsc | 2 +- 71 files changed, 351 insertions(+), 360 deletions(-) diff --git a/TestFrameworkPkg/Eftp/EftpCommon.h b/TestFrameworkPkg/Eftp/Eft= pCommon.h index 3c73d57..e4ae385 100644 --- a/TestFrameworkPkg/Eftp/EftpCommon.h +++ b/TestFrameworkPkg/Eftp/EftpCommon.h @@ -109,7 +109,7 @@ typedef struct _EFTP_COMPLETION_TOKEN { =20 typedef struct _EFTP_ERRINFO { UINT16 Code; - UINT8 *Desc; + CHAR8 *Desc; } EFTP_ERRINFO; =20 #endif diff --git a/TestFrameworkPkg/Eftp/EftpMain.c b/TestFrameworkPkg/Eftp/EftpM= ain.c index 94a0bf4..f9e84c5 100644 --- a/TestFrameworkPkg/Eftp/EftpMain.c +++ b/TestFrameworkPkg/Eftp/EftpMain.c @@ -14,13 +14,13 @@ =20 #include "EftpMain.h" =20 -UINT8 *mSupportedOptions[EFTP_SUPPORTED_OPTIONS_COUNT] =3D { +CHAR8 *mSupportedOptions[EFTP_SUPPORTED_OPTIONS_COUNT] =3D { "timeout", "blksize", "tsize", }; =20 -UINT8 *mUnsupportedOptions[EFTP_UNSUPPORTED_OPTIONS_COUNT] =3D { +CHAR8 *mUnsupportedOptions[EFTP_UNSUPPORTED_OPTIONS_COUNT] =3D { "restart", "session", "pktdelay", diff --git a/TestFrameworkPkg/Eftp/EftpMain.h b/TestFrameworkPkg/Eftp/EftpM= ain.h index c183790..c595a38 100644 --- a/TestFrameworkPkg/Eftp/EftpMain.h +++ b/TestFrameworkPkg/Eftp/EftpMain.h @@ -44,10 +44,10 @@ typedef struct _EFTP_IO_PRIVATE EFTP_IO_PRIVATE; =20 extern UINT32 mEftpDebugLevel; extern EFI_DRIVER_BINDING_PROTOCOL gEftpDriverBinding; -extern UINT8 *mSupportedOptions[EFTP_SUPPORTED_OPTI= ONS_COUNT]; -extern UINT8 *mUnsupportedOptions[EFTP_UNSUPPORTED_= OPTIONS_COUNT]; +extern CHAR8 *mSupportedOptions[EFTP_SUPPORTED_OPTI= ONS_COUNT]; +extern CHAR8 *mUnsupportedOptions[EFTP_UNSUPPORTED_= OPTIONS_COUNT]; =20 -typedef struct _EFTP_IO_PRIVATE { +struct _EFTP_IO_PRIVATE { UINTN Signature; LIST_ENTRY List; EFI_EFTP_PROTOCOL Eftp; @@ -115,7 +115,7 @@ typedef struct _EFTP_IO_PRIVATE { =20 #endif =20 -} EFTP_IO_PRIVATE; +}; =20 // // API Prototype declare diff --git a/TestFrameworkPkg/Eftp/EftpOption.c b/TestFrameworkPkg/Eftp/Eft= pOption.c index 3baaa66..8df0558 100644 --- a/TestFrameworkPkg/Eftp/EftpOption.c +++ b/TestFrameworkPkg/Eftp/EftpOption.c @@ -18,21 +18,21 @@ STATIC EFI_STATUS ExtractTsize ( OUT EFTP_OPTION *Opt, - IN UINT8 *Str + IN CHAR8 *Str ); =20 STATIC EFI_STATUS ExtractTimeout ( OUT EFTP_OPTION *Opt, - IN UINT8 *Str + IN CHAR8 *Str ); =20 STATIC EFI_STATUS ExtractBlksize ( IN EFTP_OPTION *Opt, - UINT8 *Str + CHAR8 *Str ); =20 STATIC EFTP_OPTIONOBJ mOptionObjs[] =3D { @@ -58,7 +58,7 @@ STATIC EFTP_OPTIONOBJ mOptionObjs[] =3D { } }; =20 -STATIC UINT8 mSepeator[] =3D { '.', '.', '.', ',', ',', '\0' }; +UINT8 mSepeator[] =3D { '.', '.', '.', ',', ',', '\0' }; =20 VOID EftpInitOption ( @@ -122,12 +122,12 @@ Returns: =20 --*/ { - UINT8 *P; - UINT8 *Start; + CHAR8 *P; + CHAR8 *Start; UINT8 NOption; - UINT8 *Last; - UINT8 *Name; - UINT8 *Value; + CHAR8 *Last; + CHAR8 *Name; + CHAR8 *Value; UINT16 OpCode; EFI_STATUS Status; =20 @@ -137,8 +137,8 @@ Returns: *OptionList =3D NULL; } =20 - P =3D (UINT8 *) Packet + EFTP_HEADER_LEN; - Last =3D (UINT8 *) Packet + PacketLen; + P =3D (CHAR8 *) Packet + EFTP_HEADER_LEN; + Last =3D (CHAR8 *) Packet + PacketLen; =20 OpCode =3D NTOHS (Packet->Hdr.OpCode); switch (OpCode) { @@ -277,8 +277,8 @@ Returns: =20 INTN NetAsciiStrCaseCmp ( - IN UINT8 *Left, - IN UINT8 *Right + IN CHAR8 *Left, + IN CHAR8 *Right ) /*++ =20 @@ -343,7 +343,7 @@ NetAsciiStrCaseCmp ( STATIC EFI_STATUS StrToUint64 ( - IN UINT8 *Str, + IN CHAR8 *Str, OUT UINT64*Value ) /*++ @@ -365,7 +365,7 @@ Returns: --*/ { EFI_STATUS Status; - UINT8 *P; + CHAR8 *P; =20 ASSERT (Str && Value); =20 @@ -389,7 +389,7 @@ STATIC EFI_STATUS ExtractTsize ( OUT EFTP_OPTION *Opt, - IN UINT8 *Str + IN CHAR8 *Str ) /*++ =20 @@ -418,7 +418,7 @@ STATIC EFI_STATUS ExtractTimeout ( OUT EFTP_OPTION *Opt, - IN UINT8 *Str + IN CHAR8 *Str ) /*++ =20 @@ -459,7 +459,7 @@ STATIC EFI_STATUS ExtractBlksize ( IN EFTP_OPTION *Opt, - UINT8 *Str + CHAR8 *Str ) /*++ =20 diff --git a/TestFrameworkPkg/Eftp/EftpOption.h b/TestFrameworkPkg/Eftp/Eft= pOption.h index 9601d41..ae4bcf0 100644 --- a/TestFrameworkPkg/Eftp/EftpOption.h +++ b/TestFrameworkPkg/Eftp/EftpOption.h @@ -55,7 +55,7 @@ typedef EFI_STATUS (*ExtractOption) ( OUT EFTP_OPTION * Opt, - IN UINT8 *Str + IN CHAR8 *Str ); =20 typedef @@ -66,7 +66,7 @@ EFI_STATUS =20 typedef struct _EFTP_OPTIONOBJ { UINTN Index; - UINT8 *Name; + CHAR8 *Name; ExtractOption Extract; VerifyOption Verify; } EFTP_OPTIONOBJ; diff --git a/TestFrameworkPkg/Eftp/EftpPacket.c b/TestFrameworkPkg/Eftp/Eft= pPacket.c index 7961a52..1c813f0 100644 --- a/TestFrameworkPkg/Eftp/EftpPacket.c +++ b/TestFrameworkPkg/Eftp/EftpPacket.c @@ -565,7 +565,7 @@ Returns: EFI_EFTP_PACKET *Packet; EFI_STATUS Status; UINT32 Len; - UINT8 *P; + CHAR8 *P; =20 ASSERT (Private && Err); =20 @@ -638,8 +638,8 @@ EFTP_PACKET_BUFFER * EftpBuildRequest ( IN EFTP_IO_PRIVATE *Private, IN UINT16 OpCode, - IN UINT8 *Filename, - IN UINT8 *Mode, + IN CHAR8 *Filename, + IN CHAR8 *Mode, IN UINT32 NOption, IN EFI_EFTP_OPTION *OptionList, IN EFI_EVENT_NOTIFY Func @@ -672,7 +672,7 @@ Returns: EFI_STATUS Status; UINT32 Len; UINTN Index; - UINT8 *P; + CHAR8 *P; =20 ASSERT (Filename); =20 diff --git a/TestFrameworkPkg/Eftp/EftpPacket.h b/TestFrameworkPkg/Eftp/Eft= pPacket.h index 325ff73..9a537f8 100644 --- a/TestFrameworkPkg/Eftp/EftpPacket.h +++ b/TestFrameworkPkg/Eftp/EftpPacket.h @@ -227,8 +227,8 @@ EFTP_PACKET_BUFFER * EftpBuildRequest ( IN EFTP_IO_PRIVATE *Private, IN UINT16 OpCode, - IN UINT8 *Filename, - IN UINT8 *Mode, + IN CHAR8 *Filename, + IN CHAR8 *Mode, IN UINT32 NOption, IN EFI_EFTP_OPTION *OptionList, IN EFI_EVENT_NOTIFY Func diff --git a/TestFrameworkPkg/Eftp/EftpRRQ.c b/TestFrameworkPkg/Eftp/EftpRR= Q.c index fd41c17..9c6d952 100644 --- a/TestFrameworkPkg/Eftp/EftpRRQ.c +++ b/TestFrameworkPkg/Eftp/EftpRRQ.c @@ -28,7 +28,6 @@ EftpRrqSaveBlk ( IN UINTN PacketLen ); =20 -STATIC EFI_STATUS EftpRrqRecordLostBlock ( IN EFTP_IO_PRIVATE *Private, @@ -42,7 +41,6 @@ EftpRrqFlushLostBlock ( IN EFTP_IO_PRIVATE *Private ); =20 -STATIC EFI_STATUS EftpRrqSaveLostBlock ( IN EFTP_IO_PRIVATE *Private, @@ -62,7 +60,6 @@ EftpRrqTxCallback ( IN VOID *Context ); =20 -STATIC VOID NumToAsciiStr ( IN UINTN Number, @@ -731,6 +728,9 @@ Returns: } =20 break; + + default: + break; } =20 } @@ -848,6 +848,9 @@ Returns: // return EFI_ABORTED; break; + + default: + break; } =20 return EFI_SUCCESS; @@ -909,6 +912,9 @@ Returns: // return EFI_ABORTED; break; + + default: + break; } =20 return EFI_SUCCESS; @@ -1157,6 +1163,8 @@ Returns: EftpRrqCleanUp (Private); break; =20 + default: + break; } =20 return ; @@ -1297,6 +1305,9 @@ Returns: // return EFI_ABORTED; break; + + default: + break; } =20 return EFI_SUCCESS; @@ -1375,6 +1386,9 @@ Returns: case EFTP_TIME_WAIT: return EFI_ABORTED; break; + + default: + break; } =20 return EFI_SUCCESS; @@ -1478,6 +1492,9 @@ Returns: case EFTP_TIME_WAIT: return EFI_SUCCESS; break; + + default: + break; } =20 return EFI_SUCCESS; @@ -1563,6 +1580,8 @@ Returns: EftpRrqCleanUp (Private); return ; =20 + default: + break; } =20 return ; @@ -1880,7 +1899,7 @@ Returns: return EFI_SUCCESS; } =20 -STATIC + EFI_STATUS EftpRrqRecordLostBlock ( IN EFTP_IO_PRIVATE *Private, @@ -1940,7 +1959,6 @@ Returns: (PrevEntry)->ForwardLink =3D (NewEntry);\ } =20 -STATIC EFI_STATUS EftpRrqSaveLostBlock ( IN EFTP_IO_PRIVATE *Private, diff --git a/TestFrameworkPkg/Eftp/EftpWRQ.c b/TestFrameworkPkg/Eftp/EftpWR= Q.c index d35795f..495b2a2 100644 --- a/TestFrameworkPkg/Eftp/EftpWRQ.c +++ b/TestFrameworkPkg/Eftp/EftpWRQ.c @@ -464,6 +464,9 @@ Returns: } =20 break; + + default: + break; } =20 } @@ -596,6 +599,9 @@ Returns: =20 EftpWrqCleanUp (Private); break; + + default: + break; } =20 return ; @@ -791,6 +797,9 @@ Returns: // return EFI_ABORTED; break; + + default: + break; } =20 return EFI_ABORTED; @@ -852,6 +861,9 @@ Returns: // return EFI_ABORTED; break; + + default: + break; } =20 return EFI_ABORTED; @@ -951,6 +963,9 @@ Returns: // return EFI_ABORTED; break; + + default: + break; } =20 return EFI_ABORTED; @@ -1025,7 +1040,7 @@ Returns: =20 EFTP_DEBUG_VERBOSE ((L"EftpWrqReadBlk: call PacketNeeded to fill in da= ta\n")); =20 - Status =3D Private->Token->PacketNeeded (&Private->Eftp, Private->Toke= n, &DataLen, &DataBuf); + Status =3D Private->Token->PacketNeeded (&Private->Eftp, Private->Toke= n, &DataLen, (VOID **)&DataBuf); =20 if (EFI_ERROR (Status)) { EFTP_DEBUG_ERROR ((L"EftpWrqReadBlk: PacketNeeded returns %r .\n", S= tatus)); diff --git a/TestFrameworkPkg/Include/Protocol/BbTest.h b/TestFrameworkPkg/= Include/Protocol/BbTest.h index 50e076d..f86dc91 100644 --- a/TestFrameworkPkg/Include/Protocol/BbTest.h +++ b/TestFrameworkPkg/Include/Protocol/BbTest.h @@ -52,7 +52,7 @@ EFI_STATUS // EFI Black-Box Test Entry // =20 -typedef struct _EFI_BB_TEST_ENTRY { +struct _EFI_BB_TEST_ENTRY { EFI_BB_TEST_ENTRY *Next; EFI_GUID EntryId; CHAR16 *Name; @@ -61,19 +61,19 @@ typedef struct _EFI_BB_TEST_ENTRY { EFI_GUID *SupportProtocols; EFI_TEST_ATTRIBUTE CaseAttribute; EFI_BB_ENTRY_POINT EntryPoint; -} EFI_BB_TEST_ENTRY; +}; =20 // // EFI Black-Box Test Protocol // =20 -typedef struct _EFI_BB_TEST_PROTOCOL { +struct _EFI_BB_TEST_PROTOCOL { UINT64 TestRevision; EFI_GUID CategoryGuid; CHAR16 *Name; CHAR16 *Description; EFI_BB_TEST_ENTRY *EntryList; -} EFI_BB_TEST_PROTOCOL; +}; =20 // // Global ID for EFI Black-Box Test Protocol diff --git a/TestFrameworkPkg/Include/Protocol/Eftp.h b/TestFrameworkPkg/In= clude/Protocol/Eftp.h index c7ffe5e..6e38b91 100644 --- a/TestFrameworkPkg/Include/Protocol/Eftp.h +++ b/TestFrameworkPkg/Include/Protocol/Eftp.h @@ -71,7 +71,7 @@ typedef struct { UINT16 CheckSum; UINT16 OpCode; UINT16 Rsvd; - UINT8 Filename[1]; + CHAR8 Filename[1]; } EFI_EFTP_REQ_HEADER; =20 typedef struct { @@ -102,7 +102,7 @@ typedef struct { UINT16 CheckSum; UINT16 OpCode; UINT16 ErrorCode; - UINT8 ErrorMessage[1]; + CHAR8 ErrorMessage[1]; } EFI_EFTP_ERROR_HEADER; =20 typedef union { @@ -120,8 +120,8 @@ typedef union { // EFTP option definition // typedef struct { - UINT8 *OptionStr; - UINT8 *ValueStr; + CHAR8 *OptionStr; + CHAR8 *ValueStr; } EFI_EFTP_OPTION; =20 // @@ -140,9 +140,9 @@ typedef struct { typedef struct { EFI_EFTP_CONFIG_DATA ConfigData; UINT8 SupportedOptionCount; - UINT8 **SupportedOptoins; + CHAR8 **SupportedOptoins; UINT8 UnsupportedOptionCount; - UINT8 **UnsupportedOptoins; + CHAR8 **UnsupportedOptoins; } EFI_EFTP_MODE_DATA; =20 // @@ -251,7 +251,7 @@ EFI_STATUS IN EFI_EFTP_PROTOCOL * This ); =20 -typedef struct _EFI_EFTP_PROTOCOL { +struct _EFI_EFTP_PROTOCOL { EFI_EFTP_GET_MODE_DATA GetModeData; EFI_EFTP_CONFIGURE Configure; EFI_EFTP_GET_INFO GetInfo; @@ -260,17 +260,17 @@ typedef struct _EFI_EFTP_PROTOCOL { EFI_EFTP_WRITE_FILE WriteFile; EFI_EFTP_READ_DIRECTORY ReadDirectory; EFI_EFTP_POLL Poll; -} EFI_EFTP_PROTOCOL; +}; =20 // // EFTP token data // -typedef struct _EFI_EFTP_TOKEN { +struct _EFI_EFTP_TOKEN { IN OUT EFI_STATUS Status; IN EFI_EVENT Event OPTIONAL; IN EFI_EFTP_OVERRIDE_DATA * OverrideData OPTIONAL; - IN UINT8 *Filename; - IN UINT8 *ModeStr OPTIONAL; + IN CHAR8 *Filename; + IN CHAR8 *ModeStr OPTIONAL; IN UINT32 OptionCount; IN EFI_EFTP_OPTION * OptionList OPTIONAL; IN OUT UINT64 BufferSize; @@ -279,7 +279,7 @@ typedef struct _EFI_EFTP_TOKEN { IN EFI_EFTP_CHECK_PACKET CheckPacket OPTIONAL; IN EFI_EFTP_TIMEOUT_CALLBACK TimeoutCallback OPTIONAL; IN EFI_EFTP_PACKET_NEEDED PacketNeeded OPTIONAL; -} EFI_EFTP_TOKEN; +}; =20 extern EFI_GUID gEfiEftpServiceBindingProtocolGuid; extern EFI_GUID gEfiEftpProtocolGuid; diff --git a/TestFrameworkPkg/Include/Protocol/EntsMonitorProtocol.h b/Test= FrameworkPkg/Include/Protocol/EntsMonitorProtocol.h index fcfdf8b..1b6a960 100644 --- a/TestFrameworkPkg/Include/Protocol/EntsMonitorProtocol.h +++ b/TestFrameworkPkg/Include/Protocol/EntsMonitorProtocol.h @@ -67,7 +67,7 @@ EFI_STATUS IN EFI_ENTS_MONITOR_PROTOCOL *This ); =20 -typedef struct _EFI_ENTS_MONITOR_PROTOCOL { +struct _EFI_ENTS_MONITOR_PROTOCOL { VOID *MonitorName; VOID *MonitorIo; EFI_INIT_MONITOR InitMonitor; @@ -77,6 +77,6 @@ typedef struct _EFI_ENTS_MONITOR_PROTOCOL { EFI_MONITOR_SENDER MonitorSender; EFI_MONITOR_SAVECONTEXT MonitorSaveContext; EFI_MONITOR_RESTORECONTEXT MonitorRestoreContext; -} EFI_ENTS_MONITOR_PROTOCOL; +}; =20 #endif // _ENTS_MONITOR_PROTOCOL_H_ diff --git a/TestFrameworkPkg/Include/Protocol/LibPrivate.h b/TestFramework= Pkg/Include/Protocol/LibPrivate.h index e4b57d1..db9c710 100644 --- a/TestFrameworkPkg/Include/Protocol/LibPrivate.h +++ b/TestFrameworkPkg/Include/Protocol/LibPrivate.h @@ -59,11 +59,11 @@ EFI_STATUS IN EFI_STATUS TestStatus ); =20 -typedef struct _EFI_STANDARD_TSL_PRIVATE_INTERFACE { +struct _EFI_STANDARD_TSL_PRIVATE_INTERFACE { EFI_STSL_SET_CONFIG SetConfig; EFI_STSL_BEGIN_LOGGING BeginLogging; EFI_STSL_END_LOGGING EndLogging; -} EFI_STANDARD_TSL_PRIVATE_INTERFACE; +}; =20 // // Test logging library's private interface @@ -90,11 +90,11 @@ EFI_STATUS IN EFI_STATUS TestStatus ); =20 -typedef struct _EFI_TLL_PRIVATE_INTERFACE { +struct _EFI_TLL_PRIVATE_INTERFACE { EFI_TLL_SET_CONFIG SetConfig; EFI_TLL_BEGIN_LOGGING BeginLogging; EFI_TLL_END_LOGGING EndLogging; -} EFI_TLL_PRIVATE_INTERFACE; +}; =20 // // Test recovery library's private interface @@ -109,8 +109,8 @@ EFI_STATUS IN CHAR16 *FileName ); =20 -typedef struct _EFI_TRL_PRIVATE_INTERFACE { +struct _EFI_TRL_PRIVATE_INTERFACE { EFI_TRL_SET_CONFIG SetConfig; -} EFI_TRL_PRIVATE_INTERFACE; +}; =20 #endif diff --git a/TestFrameworkPkg/Include/Protocol/StandardTestLibrary.h b/Test= FrameworkPkg/Include/Protocol/StandardTestLibrary.h index 2209dc3..3edb75b 100644 --- a/TestFrameworkPkg/Include/Protocol/StandardTestLibrary.h +++ b/TestFrameworkPkg/Include/Protocol/StandardTestLibrary.h @@ -176,14 +176,14 @@ Returns: // EFI Standard Test Library Protocol // =20 -typedef struct _EFI_STANDARD_TEST_LIBRARY_PROTOCOL { +struct _EFI_STANDARD_TEST_LIBRARY_PROTOCOL { UINT64 LibraryRevision; CHAR16 *Name; CHAR16 *Description; EFI_RECORD_ASSERTION RecordAssertion; EFI_RECORD_MESSAGE RecordMessage; EFI_GET_RESULT_COUNT GetResultCount; -} EFI_STANDARD_TEST_LIBRARY_PROTOCOL; +}; =20 // // Global ID for EFI Standard Test Library Protocol diff --git a/TestFrameworkPkg/Include/Protocol/TestLoggingLibrary.h b/TestF= rameworkPkg/Include/Protocol/TestLoggingLibrary.h index cb0e524..e1022bf 100644 --- a/TestFrameworkPkg/Include/Protocol/TestLoggingLibrary.h +++ b/TestFrameworkPkg/Include/Protocol/TestLoggingLibrary.h @@ -217,7 +217,7 @@ Returns: // EFI Test Logging Library Protocol // =20 -typedef struct _EFI_TEST_LOGGING_LIBRARY_PROTOCOL { +struct _EFI_TEST_LOGGING_LIBRARY_PROTOCOL { UINT64 LibraryRevision; CHAR16 *Name; CHAR16 *Description; @@ -226,7 +226,7 @@ typedef struct _EFI_TEST_LOGGING_LIBRARY_PROTOCOL { EFI_TLL_EXIT_FUNCTION ExitFunction; EFI_TLL_DUMP_MASK DumpMask; EFI_TLL_DUMP_BUF DumpBuf; -} EFI_TEST_LOGGING_LIBRARY_PROTOCOL; +}; =20 // // Global ID for EFI Test Logging Library Protocol diff --git a/TestFrameworkPkg/Include/Protocol/TestOutputLibrary.h b/TestFr= ameworkPkg/Include/Protocol/TestOutputLibrary.h index bcbc63d..1283273 100644 --- a/TestFrameworkPkg/Include/Protocol/TestOutputLibrary.h +++ b/TestFrameworkPkg/Include/Protocol/TestOutputLibrary.h @@ -142,14 +142,14 @@ Returns: // EFI Test Output Library Protocol // =20 -typedef struct _EFI_TEST_OUTPUT_LIBRARY_PROTOCOL { +struct _EFI_TEST_OUTPUT_LIBRARY_PROTOCOL { UINT64 LibraryRevision; CHAR16 *Name; CHAR16 *Description; EFI_TOL_OPEN Open; EFI_TOL_CLOSE Close; EFI_TOL_WRITE Write; -} EFI_TEST_OUTPUT_LIBRARY_PROTOCOL; +}; =20 // // Global ID for EFI Test Output Library Protocol diff --git a/TestFrameworkPkg/Include/Protocol/TestProfileLibrary.h b/TestF= rameworkPkg/Include/Protocol/TestProfileLibrary.h index af21ea6..a775166 100644 --- a/TestFrameworkPkg/Include/Protocol/TestProfileLibrary.h +++ b/TestFrameworkPkg/Include/Protocol/TestProfileLibrary.h @@ -33,6 +33,7 @@ // Forward reference for pure ANSI compatibility // typedef struct _EFI_INI_FILE EFI_INI_FILE; +typedef EFI_INI_FILE * EFI_INI_FILE_HANDLE; typedef struct _EFI_TEST_PROFILE_LIBRARY_PROTOCOL EFI_TEST_PROFILE_LIBRAR= Y_PROTOCOL; =20 // @@ -312,7 +313,7 @@ Returns: // EFI INI File // =20 -typedef struct _EFI_INI_FILE { +struct _EFI_INI_FILE { UINT64 Revision; EFI_INI_GETSTRING GetString; EFI_INI_SETSTRING SetString; @@ -322,7 +323,7 @@ typedef struct _EFI_INI_FILE { EFI_INI_RMSECTION_BYORDER RmSectionByOrder; EFI_INI_GETORDERNUM GetOrderNum; EFI_INI_FLUSH Flush; -} EFI_INI_FILE, *EFI_INI_FILE_HANDLE; +}; =20 // // EFI Test Profile Library Protocol API - IniOpen @@ -491,7 +492,7 @@ Returns: // EFI Test Profile Library Protocol // =20 -typedef struct _EFI_TEST_PROFILE_LIBRARY_PROTOCOL { +struct _EFI_TEST_PROFILE_LIBRARY_PROTOCOL { UINT64 LibraryRevision; CHAR16 *Name; CHAR16 *Description; @@ -500,7 +501,7 @@ typedef struct _EFI_TEST_PROFILE_LIBRARY_PROTOCOL { EFI_TPL_INI_CLOSE EfiIniClose; EFI_TPL_GET_SYSTEM_DEVICE_PATH EfiGetSystemDevicePath; EFI_TPL_SET_SYSTEM_DEVICE_PATH EfiSetSystemDevicePath; -} EFI_TEST_PROFILE_LIBRARY_PROTOCOL; +}; =20 // // Global ID for EFI Test Profile Library Protocol diff --git a/TestFrameworkPkg/Include/Protocol/TestRecoveryLibrary.h b/Test= FrameworkPkg/Include/Protocol/TestRecoveryLibrary.h index f3a445b..63d7f58 100644 --- a/TestFrameworkPkg/Include/Protocol/TestRecoveryLibrary.h +++ b/TestFrameworkPkg/Include/Protocol/TestRecoveryLibrary.h @@ -103,13 +103,13 @@ Returns: // // EFI Test Recovery Library Protocol // -typedef struct _EFI_TEST_RECOVERY_LIBRARY_PROTOCOL { +struct _EFI_TEST_RECOVERY_LIBRARY_PROTOCOL { UINT64 LibraryRevision; CHAR16 *Name; CHAR16 *Description; EFI_TRL_READ_RESET_RECORD ReadResetRecord; EFI_TRL_WRITE_RESET_RECORD WriteResetRecord; -} EFI_TEST_RECOVERY_LIBRARY_PROTOCOL; +}; =20 // // Global ID for EFI Test Recovery Library Protocol diff --git a/TestFrameworkPkg/Include/Protocol/TslInit.h b/TestFrameworkPkg= /Include/Protocol/TslInit.h index f0e93e1..6349da5 100644 --- a/TestFrameworkPkg/Include/Protocol/TslInit.h +++ b/TestFrameworkPkg/Include/Protocol/TslInit.h @@ -98,12 +98,12 @@ Returns: // EFI TSL Initiation Interface // =20 -typedef struct _EFI_TSL_INIT_INTERFACE { +struct _EFI_TSL_INIT_INTERFACE { UINT64 Revision; EFI_GUID LibraryGuid; EFI_TSL_OPEN Open; EFI_TSL_CLOSE Close; -} EFI_TSL_INIT_INTERFACE; +}; =20 // // Global ID for EFI TSL Initiation Interface diff --git a/TestFrameworkPkg/Include/Protocol/WBTest.h b/TestFrameworkPkg/= Include/Protocol/WBTest.h index 480a382..b85b6ae 100644 --- a/TestFrameworkPkg/Include/Protocol/WBTest.h +++ b/TestFrameworkPkg/Include/Protocol/WBTest.h @@ -51,7 +51,7 @@ EFI_STATUS // EFI White-Box Test Entry // =20 -typedef struct _EFI_WB_TEST_ENTRY { +struct _EFI_WB_TEST_ENTRY { EFI_WB_TEST_ENTRY *Next; EFI_GUID EntryId; CHAR16 *Name; @@ -60,20 +60,20 @@ typedef struct _EFI_WB_TEST_ENTRY { EFI_GUID *SupportProtocols; EFI_TEST_ATTRIBUTE CaseAttribute; EFI_WB_ENTRY_POINT EntryPoint; -} EFI_WB_TEST_ENTRY; +} ; =20 // // EFI White-Box Test Protocol // =20 -typedef struct _EFI_WB_TEST_PROTOCOL { +struct _EFI_WB_TEST_PROTOCOL { UINT64 TestRevision; EFI_GUID CategoryGuid; EFI_HANDLE ClientHandle; CHAR16 *Name; CHAR16 *Description; EFI_WB_TEST_ENTRY *EntryList; -} EFI_WB_TEST_PROTOCOL; +}; =20 // // Global ID for EFI White-Box Test Protocol diff --git a/TestFrameworkPkg/InstallSct/InstallSct.c b/TestFrameworkPkg/In= stallSct/InstallSct.c index 1c71535..b6a2298 100644 --- a/TestFrameworkPkg/InstallSct/InstallSct.c +++ b/TestFrameworkPkg/InstallSct/InstallSct.c @@ -467,7 +467,7 @@ GetDestination ( ShellPromptForResponse ( ShellPromptResponseTypeFreeform, L"Input index of destination FS. 'q' to exit:", - &Response + (VOID **)&Response ); Print (L"\n"); =20 @@ -561,7 +561,7 @@ BackupTests ( ShellPromptForResponse ( ShellPromptResponseTypeFreeform, Prompt, - &Response + (VOID **)&Response ); Print (L"\n"); =20 @@ -642,7 +642,7 @@ BackupStartups ( ShellPromptForResponse ( ShellPromptResponseTypeFreeform, Prompt, - &Response + (VOID **)&Response ); Print (L"\n"); =20 @@ -701,6 +701,8 @@ InstallTest ( if (SrcFsName =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } + + SrcPath =3D NULL; for (Index =3D 0; SrcFsName[Index] !=3D 0; Index++) { if (SrcFsName[Index] =3D=3D L':') { SrcPath =3D CatSPrint (NULL, L"%s", &SrcFsName[Index + 1]); @@ -771,6 +773,8 @@ InstallStartup ( if (SrcFsName =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } + + SrcPath =3D NULL; for (Index =3D 0; SrcFsName[Index] !=3D 0; Index++) { if (SrcFsName[Index] =3D=3D L':') { SrcPath =3D CatSPrint (NULL, L"%s\\..\\%s", &SrcFsName[Index + 1], I= NSTALL_SCT_STARTUP_FILE); diff --git a/TestFrameworkPkg/Library/EasLib/EntsContext.c b/TestFrameworkP= kg/Library/EasLib/EntsContext.c index b49ea99..0433877 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsContext.c +++ b/TestFrameworkPkg/Library/EasLib/EntsContext.c @@ -67,7 +67,7 @@ _RecordPrint( _BuffPrint((CHAR8 *)Record->Value, Record->Size); } =20 -STATIC + VOID _RecordListPrint( IN EFI_PASSIVE_TEST_CONTEXT_RECORD *RecordList diff --git a/TestFrameworkPkg/Library/EasLib/EntsDpath.c b/TestFrameworkPkg= /Library/EasLib/EntsDpath.c index 8c7668e..1b44d5b 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsDpath.c +++ b/TestFrameworkPkg/Library/EasLib/EntsDpath.c @@ -684,7 +684,7 @@ _DevPathMediaProtocol ( EntsCatPrint (Str, L"%g", &MediaProt->Protocol); } =20 -STATIC + VOID _DevPathFvFilePath ( IN OUT ENTS_POOL_PRINT *Str, diff --git a/TestFrameworkPkg/Library/EasLib/EntsLib.inf b/TestFrameworkPkg= /Library/EasLib/EntsLib.inf index 4052017..acdc0ad 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsLib.inf +++ b/TestFrameworkPkg/Library/EasLib/EntsLib.inf @@ -41,22 +41,22 @@ EntsContext.c =20 [Sources.Ia32] - Ia32\EfiLibPlat.h - Ia32\InitPlat.c + Ia32/EfiLibPlat.h + Ia32/InitPlat.c =20 [Sources.Ipf] - Ipf\EfiLibPlat.h - Ipf\InitPlat.c - Ipf\SalPal.c - Ipf\LibSalPal.h + Ipf/EfiLibPlat.h + Ipf/InitPlat.c + Ipf/SalPal.c + Ipf/LibSalPal.h =20 [Sources.Ebc] - Ebc\EfiLibPlat.h - Ebc\EfiLibPlat.c + Ebc/EfiLibPlat.h + Ebc/EfiLibPlat.c =20 [Sources.X64] - X64\EfiLibPlat.h - X64\EfiLibPlat.c + X64/EfiLibPlat.h + X64/EfiLibPlat.c =20 [Packages] MdePkg/MdePkg.dec diff --git a/TestFrameworkPkg/Library/EasLib/EntsMisc.c b/TestFrameworkPkg/= Library/EasLib/EntsMisc.c index bd2443d..feeadd6 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsMisc.c +++ b/TestFrameworkPkg/Library/EasLib/EntsMisc.c @@ -58,7 +58,7 @@ Returns: Status =3D gntBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &Image + (VOID **)&Image ); if (EFI_ERROR (Status)) { return Status; @@ -69,7 +69,7 @@ Returns: Status =3D gntBS->HandleProtocol ( Image->DeviceHandle, &gEfiDevicePathProtocolGuid, - &TempDevicePath + (VOID **)&TempDevicePath ); if (EFI_ERROR (Status)) { return Status; diff --git a/TestFrameworkPkg/Library/EasLib/EntsPrint.c b/TestFrameworkPkg= /Library/EasLib/EntsPrint.c index c2bd29d..9903f16 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsPrint.c +++ b/TestFrameworkPkg/Library/EasLib/EntsPrint.c @@ -115,7 +115,7 @@ _IPrint ( IN VA_LIST args ); =20 -STATIC + INTN _DbgOut ( IN VOID *Context, @@ -251,7 +251,7 @@ _PoolCatPrint ( ps.Output =3D Output; ps.Context =3D spc; ps.fmt.u.pw =3D fmt; - ps.args =3D args; + VA_COPY(ps.args, args); _Print (&ps); } =20 @@ -429,7 +429,7 @@ _IPrint ( ps.fmt.u.pc =3D fmta; } =20 - ps.args =3D args; + VA_COPY(ps.args, args); =20 if (Column !=3D (UINTN) -1) { Out->SetCursorPosition (Out, Column, Row); diff --git a/TestFrameworkPkg/Library/EasLib/EntsSupport.c b/TestFrameworkP= kg/Library/EasLib/EntsSupport.c index 9fef2a2..6cacd3b 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsSupport.c +++ b/TestFrameworkPkg/Library/EasLib/EntsSupport.c @@ -45,11 +45,11 @@ STATIC BOOLEAN Finished; STATIC EFI_NET_ASSERTION_CONFIG NetAssertionConfigData =3D {0, }; =20 #define MAX_DEVICE_PATH_STR_LEN 128 -STATIC UINTN NICDevicePathLen = =3D 0; -STATIC CHAR16 NICDevicePathStr[MAX_DEVICE_PATH_ST= R_LEN] =3D {0, }; +UINTN NICDevicePathLen = =3D 0; +CHAR16 NICDevicePathStr[MAX_DEVICE_PATH_STR_LEN] = =3D {0, }; =20 #define SCT_AGENT_NIC_DEVICE_PATH L"Sct Agent NIC Device Path" -STATIC EFI_GUID gSctVendorGuid =3D {0x72092b90, 0x17da, 0x47d1, 0x95, 0xce= , 0x88, 0xf0, 0x12, 0xe8, 0x50, 0x8d}; +EFI_GUID gSctVendorGuid =3D {0x72092b90, 0x17da, 0x47d1, 0x95, 0xce, 0x88,= 0xf0, 0x12, 0xe8, 0x50, 0x8d}; =20 #define MAX_PACKET_LENGTH 1492 =20 @@ -323,9 +323,9 @@ UdpCkSum ( STATIC UINT32 AssertionPayloadGen ( - IN UINT8 *MessageHead, - IN UINT8 *MessageBody, - OUT UINT8 *PacketBuffer + IN CHAR8 *MessageHead, + IN CHAR8 *MessageBody, + OUT CHAR8 *PacketBuffer ) /*++ =20 @@ -411,7 +411,7 @@ Returns: CopyMem (&ippkt->data[0], data, datalen); =20 ippkt->cksum =3D 0; - ippkt->cksum =3D HTONS (IpCkSum ((short *) (buffer), headlen / 2)); + ippkt->cksum =3D HTONS (IpCkSum ((UINT16 *) (buffer), headlen / 2)); =20 CopyMem (&ippkt->data[0], data, datalen); =20 @@ -481,13 +481,13 @@ Returns: =20 UINTN AssertionPacketGen ( - IN UINT8 *MessageHead, - IN UINT8 *MessageBody, + IN CHAR8 *MessageHead, + IN CHAR8 *MessageBody, IN EFI_NET_ASSERTION_CONFIG *ConfigData, - OUT UINT8 *PacketBuffer + OUT CHAR8 *PacketBuffer ) { - UINT8 *AssertionPkt; + CHAR8 *AssertionPkt; UDP_PACKET *UdpPkt; IPV4_PACKET *IpPkt; UINT32 SrcIpv4Add, DstIpv4Add; @@ -498,14 +498,14 @@ AssertionPacketGen ( SrcIpv4Add =3D HTONL (*((UINT32 *) ConfigData->StationIp.Addr)); DstIpv4Add =3D HTONL (*((UINT32 *) ConfigData->ServerIp.Addr)); =20 - AssertionPkt =3D (UINT8 *) (PacketBuffer + IPV4_HEAD_LEN + UDP_HEAD_LEN= ); + AssertionPkt =3D PacketBuffer + IPV4_HEAD_LEN + UDP_HEAD_LEN; UdpPkt =3D (UDP_PACKET *) (PacketBuffer + IPV4_HEAD_LEN); IpPkt =3D (IPV4_PACKET *) (PacketBuffer); =20 AssertionPktLen =3D AssertionPayloadGen ( MessageHead, MessageBody, - (UINT8 *) AssertionPkt + AssertionPkt ); =20 UpdLen =3D UdpPacketGen ( @@ -724,12 +724,13 @@ Returns: =20 STATIC VOID +EFIAPI NotifyFunc ( EFI_EVENT Event, - BOOLEAN *FinishedParameter + VOID *FinishedParameter ) { - *FinishedParameter =3D TRUE; + *(BOOLEAN *)FinishedParameter =3D TRUE; return ; } =20 @@ -837,7 +838,7 @@ NetAssertionUtilityInstall ( Status =3D gntBS->HandleProtocol ( ControllerHandle, &gEfiManagedNetworkServiceBindingProtocolGuid, - &MnpSb + (VOID **)&MnpSb ); if (EFI_ERROR (Status)) { return Status; @@ -862,7 +863,7 @@ NetAssertionUtilityInstall ( Status =3D gntBS->OpenProtocol ( MnpChildHandle, &gEfiManagedNetworkProtocolGuid, - &Mnp, + (VOID **)&Mnp, mImageHandle, MnpChildHandle, EFI_OPEN_PROTOCOL_BY_DRIVER @@ -994,7 +995,7 @@ EntsNetworkServiceBindingGetControllerHandle ( Status =3D gntBS->HandleProtocol ( NICHandleBuffer[Index], &gEfiDevicePathProtocolGuid, - &DevicePath + (VOID **)&DevicePath ); if (EFI_ERROR(Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"Can not get device path - %r\n"= , Status)); @@ -1073,7 +1074,7 @@ EntsChooseNICAndSave ( Status =3D gntBS->HandleProtocol ( NicHandleBuffer[Index], &gEfiDevicePathProtocolGuid, - &NicDevicePath + (VOID **)&NicDevicePath ); if (EFI_ERROR(Status)) { EFI_ENTS_DEBUG((EFI_ENTS_D_ERROR, L"EntsChooseNICAndSave: HandleProt= ocol fail - %r", NicHandleBuffer[Index], Status)); @@ -1144,7 +1145,7 @@ GetMacAddress ( Status =3D gntBS->HandleProtocol ( ControllerHandle, &gEfiManagedNetworkServiceBindingProtocolGuid, - &MnpSb + (VOID **)&MnpSb ); if (EFI_ERROR(Status)) { EFI_ENTS_DEBUG((EFI_ENTS_D_ERROR, L"GetMacAddress: Handle MNP Service = Binding Protocol fail - %r", Status)); diff --git a/TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c b/TestFramewo= rkPkg/Library/EfiTestLib/EfiTestLib.c index c6897be..ac9912b 100644 --- a/TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c +++ b/TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c @@ -158,7 +158,7 @@ EfiInitAndInstallBBTestInterface ( Status =3D gtBS->HandleProtocol ( *Handle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { return EFI_INVALID_PARAMETER; @@ -253,7 +253,7 @@ EfiInitAndInstallIHVBBTestInterface ( Status =3D gtBS->HandleProtocol ( *Handle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { return EFI_INVALID_PARAMETER; @@ -452,7 +452,7 @@ EfiInitAndInstallWBTestInterface ( Status =3D gtBS->HandleProtocol ( *Handle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { return EFI_INVALID_PARAMETER; @@ -590,7 +590,7 @@ BuildBBTestInterface ( Status =3D gtBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_BB_TEST_PROTOCOL), - &BBTest + (VOID **)&BBTest ); if (EFI_ERROR (Status)) { return NULL; @@ -638,7 +638,7 @@ AddBBTestEntry ( Status =3D gtBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_BB_TEST_ENTRY), - &BBTestEntry + (VOID **)&BBTestEntry ); if (EFI_ERROR (Status)) { return Status; @@ -661,7 +661,7 @@ AddBBTestEntry ( Status =3D gtBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_GUID) * (GuidCount + 1), - &BBTestEntry->SupportProtocols + (VOID **)&BBTestEntry->SupportProtocols ); if (EFI_ERROR (Status)) { gtBS->FreePool (BBTestEntry); @@ -725,7 +725,7 @@ BuildWBTestInterface ( Status =3D gtBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_WB_TEST_PROTOCOL), - &WBTest + (VOID **)&WBTest ); if (EFI_ERROR (Status)) { return NULL; @@ -774,7 +774,7 @@ AddWBTestEntry ( Status =3D gtBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_WB_TEST_ENTRY), - &WBTestEntry + (VOID **)&WBTestEntry ); if (EFI_ERROR (Status)) { return Status; @@ -797,7 +797,7 @@ AddWBTestEntry ( Status =3D gtBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_GUID) * (GuidCount + 1), - &WBTestEntry->SupportProtocols + (VOID **)&WBTestEntry->SupportProtocols ); if (EFI_ERROR (Status)) { gtBS->FreePool (WBTestEntry); diff --git a/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkM= onitor.c b/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMon= itor.c index 6988c9d..a4775a2 100644 --- a/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.c +++ b/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.c @@ -227,7 +227,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_ENTS_MONITOR_PROTOCOL), - &gIP4NetworkMonitorInterface + (VOID **)&gIP4NetworkMonitorInterface ); if (EFI_ERROR (Status)) { goto Error; @@ -334,7 +334,7 @@ Returns: Status =3D gBS->LocateProtocol ( &gEfiIp4ServiceBindingProtocolGuid, NULL, - &Ip4Sb + (VOID **)&Ip4Sb ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"Locate Ip4Sb Error")); @@ -360,7 +360,7 @@ Returns: Status =3D gBS->OpenProtocol ( mIp4InstanceHandle, &gEfiIp4ProtocolGuid, - &Ip4, + (VOID **)&Ip4, mImageHandle, mIp4InstanceHandle, EFI_OPEN_PROTOCOL_BY_DRIVER @@ -455,7 +455,7 @@ Returns: Status =3D gBS->LocateProtocol ( &gEfiIp4ServiceBindingProtocolGuid, NULL, - &Ip4Sb + (VOID **)&Ip4Sb ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"Locate Ip4Sb Error")); diff --git a/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/Managed= NetworkMonitor.c b/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/M= anagedNetworkMonitor.c index 48a840d..8d2a8c2 100644 --- a/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/ManagedNetwork= Monitor.c +++ b/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/ManagedNetwork= Monitor.c @@ -47,7 +47,7 @@ STATIC EFI_MANAGED_NETWORK_COMPLETION_TOKEN TxLLToken; STATIC EFI_MANAGED_NETWORK_COMPLETION_TOKEN RxToken; STATIC EFI_MANAGED_NETWORK_TRANSMIT_DATA TxData; STATIC EFI_MANAGED_NETWORK_TRANSMIT_DATA TxLLData; -STATIC EFI_MANAGED_NETWORK_TRANSMIT_DATA TxProbeResp; + EFI_MANAGED_NETWORK_TRANSMIT_DATA TxProbeResp; STATIC EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData; STATIC BOOLEAN HasReceivePacket =3D FA= LSE; =20 @@ -233,7 +233,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_ENTS_MONITOR_PROTOCOL), - &gManagedNetworkMonitorInterface + (VOID **)&gManagedNetworkMonitorInterface ); if (EFI_ERROR (Status)) { goto Error; @@ -351,7 +351,7 @@ Returns: Status =3D gBS->HandleProtocol ( ControllerHandle, &gEfiManagedNetworkServiceBindingProtocolGuid, - &MnpSb + (VOID **)&MnpSb ); if (EFI_ERROR (Status)) { return Status; @@ -376,7 +376,7 @@ Returns: Status =3D gBS->OpenProtocol ( mMnpInstanceHandle, &gEfiManagedNetworkProtocolGuid, - &mMnp, + (VOID **)&mMnp, mImageHandle, mMnpInstanceHandle, EFI_OPEN_PROTOCOL_BY_DRIVER diff --git a/TestFrameworkPkg/MonitorServices/SerialMonitor/SerialMonitor.c= b/TestFrameworkPkg/MonitorServices/SerialMonitor/SerialMonitor.c index 9e452b1..cc44e0b 100644 --- a/TestFrameworkPkg/MonitorServices/SerialMonitor/SerialMonitor.c +++ b/TestFrameworkPkg/MonitorServices/SerialMonitor/SerialMonitor.c @@ -217,13 +217,13 @@ Returns: gBS->HandleProtocol ( HandleBuffer[HANDLE_IN_USE - 1], &gEfiSerialIoProtocolGuid, - &SerialIo + (VOID **)&SerialIo ); } else { Status =3D gBS->LocateProtocol ( &gEfiSerialIoProtocolGuid, NULL, - &SerialIo + (VOID **)&SerialIo ); if (EFI_ERROR (Status)) { return Status; @@ -506,7 +506,7 @@ Returns: Status =3D gBS->UninstallMultipleProtocolInterfaces ( ImageHandle, &gEfiEntsMonitorProtocolGuid, - gSerialMonitorInterface, + (VOID **)gSerialMonitorInterface, NULL ); =20 @@ -558,7 +558,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_ENTS_MONITOR_PROTOCOL), - &gSerialMonitorInterface + (VOID **)&gSerialMonitorInterface ); if (EFI_ERROR (Status)) { goto Error; diff --git a/TestFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c b/Tes= tFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c index dc6e1c5..e86a790 100644 --- a/TestFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c +++ b/TestFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c @@ -506,7 +506,7 @@ ParseHob ( return EFI_NOT_FOUND; } =20 - Status =3D gST->BootServices->AllocatePool (EfiBootServicesData, REPORT_= BUFFER_SIZE, &(VOID*)ReportBuffer); + Status =3D gST->BootServices->AllocatePool (EfiBootServicesData, REPORT_= BUFFER_SIZE, (VOID **)&ReportBuffer); if (EFI_ERROR (Status)) { gST->BootServices->FreePool ((VOID*)ReportBuffer); return Status; @@ -693,7 +693,7 @@ InitManageModule ( Fclose(InitConfig); goto end; } - Status =3D gST->BootServices->AllocatePool (EfiBootServicesData, FileSiz= e, &(VOID*)FileBuffer); + Status =3D gST->BootServices->AllocatePool (EfiBootServicesData, FileSiz= e, (VOID **)&FileBuffer); if (EFI_ERROR (Status)) { goto end; } diff --git a/TestFrameworkPkg/Sct/Core/SctInit.c b/TestFrameworkPkg/Sct/Cor= e/SctInit.c index c3581ad..6e27eae 100644 --- a/TestFrameworkPkg/Sct/Core/SctInit.c +++ b/TestFrameworkPkg/Sct/Core/SctInit.c @@ -77,7 +77,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_FRAMEWORK_TABLE), - &gFT + (VOID **)&gFT ); if (EFI_ERROR (Status)) { return Status; diff --git a/TestFrameworkPkg/Sct/Data/ApTest.c b/TestFrameworkPkg/Sct/Data= /ApTest.c index a730bf2..a53e8a4 100644 --- a/TestFrameworkPkg/Sct/Data/ApTest.c +++ b/TestFrameworkPkg/Sct/Data/ApTest.c @@ -405,7 +405,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_AP_TEST_INTERFACE), - &TempApTest + (VOID **)&TempApTest ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -781,7 +781,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_AP_TEST_ENTRY), - &TempApEntry + (VOID **)&TempApEntry ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Data/Category.c b/TestFrameworkPkg/Sct/Da= ta/Category.c index e59a796..1df7666 100644 --- a/TestFrameworkPkg/Sct/Data/Category.c +++ b/TestFrameworkPkg/Sct/Data/Category.c @@ -509,7 +509,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_CATEGORY_DATA), - &TempCategory + (VOID **)&TempCategory ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Data/TestCase.c b/TestFrameworkPkg/Sct/Da= ta/TestCase.c index 97fab1d..63b4255 100644 --- a/TestFrameworkPkg/Sct/Data/TestCase.c +++ b/TestFrameworkPkg/Sct/Data/TestCase.c @@ -1477,7 +1477,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_TEST_CASE), - &TempTestCase + (VOID **)&TempTestCase ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Data/TestNode.c b/TestFrameworkPkg/Sct/Da= ta/TestNode.c index 9ced0ab..30df071 100644 --- a/TestFrameworkPkg/Sct/Data/TestNode.c +++ b/TestFrameworkPkg/Sct/Data/TestNode.c @@ -479,7 +479,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_TEST_NODE), - &TempTestNode + (VOID **)&TempTestNode ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/DeviceConfig/DeviceConfig.c b/TestFramewo= rkPkg/Sct/DeviceConfig/DeviceConfig.c index dc69720..732ec2f 100644 --- a/TestFrameworkPkg/Sct/DeviceConfig/DeviceConfig.c +++ b/TestFrameworkPkg/Sct/DeviceConfig/DeviceConfig.c @@ -132,7 +132,7 @@ Input ( CHAR16 *Response; =20 Response =3D NULL; - ShellPromptForResponse (ShellPromptResponseTypeFreeform, Prompt, &Respon= se); + ShellPromptForResponse (ShellPromptResponseTypeFreeform, Prompt, (VOID *= *)&Response); if (Response =3D=3D NULL) { StrnCpy (String, L"", Length); } else { @@ -443,7 +443,7 @@ DeviceConfigInsert ( Status =3D gBS->HandleProtocol ( Handle, &gEfiDevicePathProtocolGuid, - &DevicePath + (VOID **)&DevicePath ); if (EFI_ERROR (Status)) { Print (L" Invalid handle number!\n"); @@ -936,7 +936,7 @@ DeviceConfigScan ( Status =3D gBS->HandleProtocol ( HandleBuffer[Index], &gEfiDevicePathProtocolGuid, - &DevicePath + (VOID **)&DevicePath ); if (EFI_ERROR (Status)) { continue; @@ -949,7 +949,7 @@ DeviceConfigScan ( Status =3D gBS->HandleProtocol ( HandleBuffer[Index], &gEfiPciIoProtocolGuid, - &PciIo + (VOID **)&PciIo ); if (EFI_ERROR (Status)) { continue; @@ -1244,7 +1244,7 @@ DeviceConfigScanDrivers ( Status =3D gBS->HandleProtocol ( EntryBuffer[Index2].AgentHandle, &gEfiComponentNameProtocolGuid, - &ComponentName + (VOID **)&ComponentName ); if (!EFI_ERROR (Status)) { Status =3D ComponentName->GetDriverName ( @@ -1275,7 +1275,7 @@ DeviceConfigScanDrivers ( Status =3D gBS->HandleProtocol ( EntryBuffer[Index2].AgentHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (!EFI_ERROR (Status)) { FilePathStr =3D ConvertDevicePathToText (LoadedImage->FilePath= , FALSE, FALSE); diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Arg/EasArg.c b/TestFra= meworkPkg/Sct/ENTS/EasDispatcher/Arg/EasArg.c index 296271d..4e7ede2 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Arg/EasArg.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Arg/EasArg.c @@ -130,7 +130,7 @@ Returns: } =20 if ((Feature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATURE_POINTER) { - VarBaseAddress =3D &(UINT8 *) RivlVariable->Address; + VarBaseAddress =3D (UINT8 **) &RivlVariable->Address; } else { VarBaseAddress =3D RivlVariable->Address; } diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Core/EasInit.c b/TestF= rameworkPkg/Sct/ENTS/EasDispatcher/Core/EasInit.c index 389f848..2881010 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Core/EasInit.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Core/EasInit.c @@ -267,7 +267,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_NETWORK_TEST_FRAMEWORK_TABLE), - &gEasFT + (VOID **)&gEasFT ); if (EFI_ERROR (Status)) { return Status; @@ -281,7 +281,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_MONITOR_COMMAND), - &gEasFT->Cmd + (VOID **)&gEasFT->Cmd ); if (EFI_ERROR (Status)) { FreePool (gEasFT->Cmd); @@ -579,7 +579,7 @@ Returns: Status =3D gBS->HandleProtocol ( HandleBuffer[Index], &gEfiEntsMonitorProtocolGuid, - &EntsMonitorInterface + (VOID **)&EntsMonitorInterface ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG((EFI_ENTS_D_ERROR, L"Can not get ENTS Monitor interfa= ce - %r", Status)); diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c b/Te= stFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c index 4c55e20..cbb49dc 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c @@ -1001,7 +1001,7 @@ Returns: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"in ExecElet: HandleProtocol - %= r", Status)); @@ -1183,7 +1183,7 @@ Returns: Status =3D gBS->HandleProtocol ( HandleBuffer[HandleIndex], &gEfiEntsProtocolGuid, - &Interface + (VOID **)&Interface ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"Handle protocol - %r, Index - %= d", Status, HandleIndex)); @@ -1367,7 +1367,7 @@ Returns: // // Locate CpuArch protocol // - Status =3D gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, &Cpu); + Status =3D gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID = **)&Cpu); if (EFI_ERROR (Status)) { Print (L"Locate CpuArch protocol error\n"); } diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EftpImplement.c b= /TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EftpImplement.c index 2529248..90225d8 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EftpImplement.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EftpImplement.c @@ -68,7 +68,6 @@ Returns: return Index; } =20 -STATIC EFI_STATUS EftpTimeoutCallback ( IN EFI_EFTP_PROTOCOL *This, @@ -95,7 +94,7 @@ Returns: return EFI_SUCCESS; } =20 -STATIC + EFI_STATUS OpenMnpProtocol ( VOID @@ -131,7 +130,7 @@ Returns: Status =3D gBS->HandleProtocol ( ControllerHandle, &gEfiManagedNetworkServiceBindingProtocolGuid, - &TmpMnpSb + (VOID **)&TmpMnpSb ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"OpenMnpProtocol: LocateProtocol e= rror ! - %r", Status)); @@ -173,7 +172,7 @@ Returns: return EFI_SUCCESS; } =20 -STATIC + EFI_STATUS CloseMnpProtocol ( VOID @@ -241,7 +240,7 @@ OpenEftpProtocol ( Status =3D gBS->HandleProtocol ( ControllerHandle, &gEfiEftpServiceBindingProtocolGuid, - &TmpEftpSb + (VOID **)&TmpEftpSb ); if (EFI_ERROR(Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"No Eftp driver has found!\n")); @@ -355,7 +354,7 @@ Returns: Status =3D gBS->HandleProtocol ( mImageHandle, &gEfiLoadedImageProtocolGuid, - &Image + (VOID **)&Image ); if (EFI_ERROR (Status)) { Print (L"Error: HandleProtocol LoadedImage ! - %r\n", Status); @@ -365,7 +364,7 @@ Returns: Status =3D gBS->HandleProtocol ( Image->DeviceHandle, &gEfiDevicePathProtocolGuid, - &DevicePath + (VOID **)&DevicePath ); if (EFI_ERROR (Status)) { Print (L"Error: HandleProtocol DevicePath ! - %r\n", Status); @@ -609,8 +608,8 @@ Returns: EFI_STATUS Status; EFI_EFTP_TOKEN Token; EFI_EFTP_CONFIG_DATA EftpCfgData; - UINT8 FileName[MAX_FILENAME_LEN]; - UINT8 ModeStr[MAX_MODE_STR_LEN]; + CHAR8 FileName[MAX_FILENAME_LEN]; + CHAR8 ModeStr[MAX_MODE_STR_LEN]; UINTN MacAddrLen; =20 // diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasSupportFile.c = b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasSupportFile.c index 039fe73..418fbe2 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasSupportFile.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasSupportFile.c @@ -133,7 +133,7 @@ Returns: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"in LoadTestFile: Locate file volu= me - %r", Status)); @@ -172,7 +172,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR (Status)) { TestDir->Close (TestDir); @@ -424,7 +424,7 @@ Returns: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { return Status; @@ -446,7 +446,7 @@ Returns: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiEntsMonitorProtocolGuid, - &EntsMonitorProtocol + (VOID **)&EntsMonitorProtocol ); if (!EFI_ERROR (Status)) { Status =3D EntsCreateSingleSupportFile ( @@ -551,7 +551,7 @@ Returns: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { return Status; @@ -685,7 +685,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_NETWORK_TEST_FILE), - TestFile + (VOID **)TestFile ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasTestFile.c b/T= estFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasTestFile.c index 7701a69..d37dd11 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasTestFile.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Load/EasTestFile.c @@ -119,7 +119,7 @@ Returns: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"in LoadTestFile: Locate file volu= me - %r", Status)); @@ -158,7 +158,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR (Status)) { TestDir->Close (TestDir); @@ -440,7 +440,7 @@ Returns: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { return Status; @@ -462,7 +462,7 @@ Returns: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiEntsProtocolGuid, - &EntsProtocol + (VOID **)&EntsProtocol ); if (!EFI_ERROR (Status)) { Status =3D EntsCreateSingleTestFile ( @@ -598,7 +598,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_NETWORK_TEST_FILE), - TestFile + (VOID **)TestFile ); if (EFI_ERROR (Status)) { EFI_ENTS_DEBUG ((EFI_ENTS_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c b/= TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c index 99e3d37..efb7289 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c @@ -563,7 +563,7 @@ Returns: } =20 if ((Feature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATURE_POINTER) { - VarBaseAddress =3D &(UINT8 *) RivlVariable->Address; + VarBaseAddress =3D (UINT8 **)&RivlVariable->Address; } else { VarBaseAddress =3D RivlVariable->Address; } @@ -608,7 +608,7 @@ Returns: } =20 if ((BufferFeature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATURE_P= OINTER) { - BufferVarBaseAddress =3D &(UINT8 *) RivlBufferVariable->Address; + BufferVarBaseAddress =3D (UINT8 **)&RivlBufferVariable->Address; } else { BufferVarBaseAddress =3D RivlBufferVariable->Address; } @@ -686,7 +686,7 @@ Returns: } =20 if ((BufferFeature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATU= RE_POINTER) { - BufferVarBaseAddress =3D &(UINT8 *) RivlBufferVariable->Address; + BufferVarBaseAddress =3D (UINT8 **)&RivlBufferVariable->Address; } else { BufferVarBaseAddress =3D RivlBufferVariable->Address; } @@ -749,7 +749,7 @@ Returns: } =20 if ((BufferFeature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATURE= _POINTER) { - BufferVarBaseAddress =3D &(UINT8 *) RivlBufferVariable->Address; + BufferVarBaseAddress =3D (UINT8 **)&RivlBufferVariable->Address; } else { BufferVarBaseAddress =3D RivlBufferVariable->Address; } @@ -815,7 +815,7 @@ Returns: } =20 if ((BufferFeature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATU= RE_POINTER) { - BufferVarBaseAddress =3D &(UINT8 *) RivlBufferVariable->Address; + BufferVarBaseAddress =3D (UINT8 **)&RivlBufferVariable->Address; } else { BufferVarBaseAddress =3D RivlBufferVariable->Address; } @@ -887,7 +887,7 @@ Returns: } =20 if ((BufferFeature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEA= TURE_POINTER) { - BufferVarBaseAddress =3D &(UINT8 *) RivlBufferVariable->Addres= s; + BufferVarBaseAddress =3D (UINT8 **)&RivlBufferVariable->Addres= s; } else { BufferVarBaseAddress =3D RivlBufferVariable->Address; } @@ -946,7 +946,7 @@ Returns: } =20 if ((BufferFeature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATU= RE_POINTER) { - BufferVarBaseAddress =3D &(UINT8 *) RivlBufferVariable->Address; + BufferVarBaseAddress =3D (UINT8 **)&RivlBufferVariable->Address; } else { BufferVarBaseAddress =3D RivlBufferVariable->Address; } @@ -1045,7 +1045,7 @@ Returns: } =20 if ((Feature & RIVL_VAR_FEATURE_POINTER) !=3D RIVL_VAR_FEATURE_POINTER) { - VarBaseAddress =3D &(UINT8 *) RivlVariable->Address; + VarBaseAddress =3D (UINT8 **)&RivlVariable->Address; } else { VarBaseAddress =3D RivlVariable->Address; } diff --git a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c b/TestFrameworkP= kg/Sct/Execute/ExecuteSupport.c index 7c88716..43b117d 100644 --- a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c +++ b/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c @@ -646,7 +646,7 @@ DeviceConfigGetString ( ); } =20 -STATIC + EFI_STATUS DeviceConfigSetString ( IN EFI_INI_FILE_HANDLE IniFile, @@ -788,7 +788,7 @@ GatherConfigHandles ( Status =3D gBS->HandleProtocol ( SupportHandle, &gEfiTestProfileLibraryGuid, - &ProfileLib + (VOID **)&ProfileLib ); if (EFI_ERROR (Status)) { return Status; @@ -900,7 +900,7 @@ GatherConfigHandles ( Status =3D gBS->HandleProtocol ( HandleBuffer[Index], &gEfiDevicePathProtocolGuid, - &DevicePath + (VOID **)&DevicePath ); if (EFI_ERROR (Status)) { continue; diff --git a/TestFrameworkPkg/Sct/Execute/Reset.c b/TestFrameworkPkg/Sct/Ex= ecute/Reset.c index 6e71789..5723ddf 100644 --- a/TestFrameworkPkg/Sct/Execute/Reset.c +++ b/TestFrameworkPkg/Sct/Execute/Reset.c @@ -348,7 +348,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR(Status)) { return Status; @@ -390,7 +390,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR(Status)) { Handle->Close (Handle); @@ -527,7 +527,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR(Status)) { return Status; diff --git a/TestFrameworkPkg/Sct/Include/ApTest.h b/TestFrameworkPkg/Sct/I= nclude/ApTest.h index 85b58ae..bda6b87 100644 --- a/TestFrameworkPkg/Sct/Include/ApTest.h +++ b/TestFrameworkPkg/Sct/Include/ApTest.h @@ -42,7 +42,7 @@ typedef struct _EFI_AP_TEST_ENTRY EFI_AP_TEST_ENTRY; // EFI Application Test Entry Point // =20 -typedef struct _EFI_AP_TEST_ENTRY { +struct _EFI_AP_TEST_ENTRY { EFI_AP_TEST_ENTRY *Next; EFI_GUID EntryId; CHAR16 *Name; @@ -51,7 +51,7 @@ typedef struct _EFI_AP_TEST_ENTRY { EFI_GUID *SupportProtocols; UINT32 CaseAttribute; CHAR16 *Parameters; -} EFI_AP_TEST_ENTRY; +}; =20 // // EFI Application Test Interface diff --git a/TestFrameworkPkg/Sct/Include/SctOutput.h b/TestFrameworkPkg/Sc= t/Include/SctOutput.h index ece573d..ffd17e8 100644 --- a/TestFrameworkPkg/Sct/Include/SctOutput.h +++ b/TestFrameworkPkg/Sct/Include/SctOutput.h @@ -36,13 +36,13 @@ // typedef struct _TEST_OUTPUT_FILE TEST_OUTPUT_FILE; =20 -typedef struct _TEST_OUTPUT_FILE { +struct _TEST_OUTPUT_FILE { TEST_OUTPUT_FILE *Next; EFI_DEVICE_PATH_PROTOCOL *DevicePath; CHAR16 *FileName; EFI_FILE_HANDLE FileHandle; UINTN OpenCount; -} TEST_OUTPUT_FILE; +}; =20 typedef struct { UINT32 Signature; diff --git a/TestFrameworkPkg/Sct/Load/SupportFile.c b/TestFrameworkPkg/Sct= /Load/SupportFile.c index 4d51370..ebeefcb 100644 --- a/TestFrameworkPkg/Sct/Load/SupportFile.c +++ b/TestFrameworkPkg/Sct/Load/SupportFile.c @@ -149,7 +149,7 @@ Returns: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Locate file system - %r", Status)); @@ -191,7 +191,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -383,8 +383,8 @@ Returns: // Status =3D OpenSingleSupportFile ( &gEfiStandardTestLibraryGuid, - &gFT->StslProtocol, - &gFT->StslInterface + (VOID **)&gFT->StslProtocol, + (VOID **)&gFT->StslInterface ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Open standard test - %r", Status)); @@ -397,7 +397,7 @@ Returns: // Status =3D OpenSingleSupportFile ( &gEfiTestProfileLibraryGuid, - &gFT->TplProtocol, + (VOID **)&gFT->TplProtocol, NULL ); if (EFI_ERROR (Status)) { @@ -411,8 +411,8 @@ Returns: // Status =3D OpenSingleSupportFile ( &gEfiTestRecoveryLibraryGuid, - &gFT->TrlProtocol, - &gFT->TrlInterface + (VOID **)&gFT->TrlProtocol, + (VOID **)&gFT->TrlInterface ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Open test recovery - %r", Status)); @@ -425,8 +425,8 @@ Returns: // Status =3D OpenSingleSupportFile ( &gEfiTestLoggingLibraryGuid, - &gFT->TllProtocol, - &gFT->TllInterface + (VOID **)&gFT->TllProtocol, + (VOID **)&gFT->TllInterface ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Open test logging - %r", Status)); @@ -730,7 +730,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Locate loaded image - %r", Status)); @@ -758,7 +758,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiTslInitInterfaceGuid, - &TslInit + (VOID **)&TslInit ); if (!EFI_ERROR (Status)) { Status =3D CreateSingleSupportFile ( @@ -819,7 +819,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_TEST_FILE), - SupportFile + (VOID **)SupportFile ); if (EFI_ERROR(Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -1107,7 +1107,7 @@ Returns: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Locate file system - %r", Status)); @@ -1149,7 +1149,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -1387,7 +1387,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Locate loaded image - %r", Status)); @@ -1469,7 +1469,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_TEST_FILE), - ProxyFile + (VOID **)ProxyFile ); if (EFI_ERROR(Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Load/TestFile.c b/TestFrameworkPkg/Sct/Lo= ad/TestFile.c index 7f22141..38900e7 100644 --- a/TestFrameworkPkg/Sct/Load/TestFile.c +++ b/TestFrameworkPkg/Sct/Load/TestFile.c @@ -124,7 +124,7 @@ Returns: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Locate file system - %r", Status)); @@ -166,7 +166,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -579,7 +579,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Locate loaded image - %r", Status)); @@ -607,7 +607,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiBbTestGuid, - &BbTest + (VOID **)&BbTest ); if (!EFI_ERROR (Status)) { Status =3D CreateSingleTestFile ( @@ -633,7 +633,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiWbTestGuid, - &WbTest + (VOID **)&WbTest ); if (!EFI_ERROR (Status)) { Status =3D CreateSingleTestFile ( @@ -659,7 +659,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( ImageHandle, &gEfiIHVBbTestGuid, - &BbTest + (VOID **)&BbTest ); if (!EFI_ERROR (Status)) { Status =3D CreateSingleTestFile ( @@ -838,7 +838,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_TEST_FILE), - TestFile + (VOID **)TestFile ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Misc/SctMisc.c b/TestFrameworkPkg/Sct/Mis= c/SctMisc.c index 23308ea..1108f63 100644 --- a/TestFrameworkPkg/Sct/Misc/SctMisc.c +++ b/TestFrameworkPkg/Sct/Misc/SctMisc.c @@ -298,7 +298,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(CHAR16) * (Length + 1), - &ShortFileName + (VOID **)&ShortFileName ); if (EFI_ERROR(Status)) { return NULL; @@ -1236,7 +1236,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, (NumberOfTokens + 1) * sizeof(EFI_GUID), - GuidArray + (VOID **)GuidArray ); if (EFI_ERROR (Status)) { FreePool (TempBuffer); diff --git a/TestFrameworkPkg/Sct/Operation/Operation.c b/TestFrameworkPkg/= Sct/Operation/Operation.c index b7215ea..8fbff61 100644 --- a/TestFrameworkPkg/Sct/Operation/Operation.c +++ b/TestFrameworkPkg/Sct/Operation/Operation.c @@ -721,7 +721,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_CONFIG_DATA), - &gFT->ConfigData + (VOID **)&gFT->ConfigData ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Report/Report.c b/TestFrameworkPkg/Sct/Re= port/Report.c index 5ba4653..e2dfc21 100644 --- a/TestFrameworkPkg/Sct/Report/Report.c +++ b/TestFrameworkPkg/Sct/Report/Report.c @@ -141,7 +141,7 @@ Returns: DevicePath, FileName, &BufferSize, - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Read file to buffer - %r", Status)); @@ -257,7 +257,7 @@ Returns: DevicePath, FileName, &BufferSize, - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Read file to buffer - %r", Stat= us)); @@ -374,7 +374,7 @@ Returns: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Handle protocol - %r", Status)); @@ -416,7 +416,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -467,7 +467,7 @@ Returns: DevicePath, FileName, &BufferSize, - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_DEBUG, L"Read file to buffer - %r", Stat= us)); @@ -640,7 +640,7 @@ Arguments: // Status =3D SctReportConfig ( &ConfigBufferSize, - &ConfigBuffer + (VOID **)&ConfigBuffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"SctReportConfig: %r", Status)); @@ -708,7 +708,7 @@ Arguments: Status =3D gBS->AllocatePool ( EfiBootServicesData, AsciiBufferSize, - &AsciiBuffer + (VOID **)&AsciiBuffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Report/ReportConfig.c b/TestFrameworkPkg/= Sct/Report/ReportConfig.c index 94decea..11e63f4 100644 --- a/TestFrameworkPkg/Sct/Report/ReportConfig.c +++ b/TestFrameworkPkg/Sct/Report/ReportConfig.c @@ -22,7 +22,7 @@ EFI_STATUS SctReportConfig ( OUT UINTN *BufferSize, - OUT UINT8 **Buffer + OUT VOID **Buffer ) /*++ =20 diff --git a/TestFrameworkPkg/Sct/Report/ReportDatabase.c b/TestFrameworkPk= g/Sct/Report/ReportDatabase.c index b44e6e2..d3df65e 100644 --- a/TestFrameworkPkg/Sct/Report/ReportDatabase.c +++ b/TestFrameworkPkg/Sct/Report/ReportDatabase.c @@ -106,7 +106,7 @@ Routine Description: DevicePath, FileName, &BufferSize, - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Read file to buffer - %r", Status)); @@ -983,7 +983,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, mGuidDatabaseMaxSize * sizeof(EFI_SCT_GUID_DATABASE), - &mGuidDatabase + (VOID **)&mGuidDatabase ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -1003,7 +1003,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, mGuidDatabaseMaxSize * sizeof(EFI_SCT_GUID_DATABASE), - &TempGuidDatabase + (VOID **)&TempGuidDatabase ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -1117,7 +1117,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, mGuidAssertionMaxSize * sizeof(EFI_SCT_GUID_ASSERTION), - &mGuidAssertion + (VOID **)&mGuidAssertion ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -1137,7 +1137,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, mGuidAssertionMaxSize * sizeof(EFI_SCT_GUID_ASSERTION), - &TempGuidAssertion + (VOID **)&TempGuidAssertion ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -1291,7 +1291,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_REPORT_ITEM), - &NewReportItem + (VOID **)&NewReportItem ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -1334,7 +1334,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof(EFI_SCT_ASSERTION_INFOR), - &NewAssertionInfor + (VOID **)&NewAssertionInfor ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Report/ReportSupport.c b/TestFrameworkPkg= /Sct/Report/ReportSupport.c index e1428ca..f334730 100644 --- a/TestFrameworkPkg/Sct/Report/ReportSupport.c +++ b/TestFrameworkPkg/Sct/Report/ReportSupport.c @@ -94,7 +94,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { return FALSE; @@ -182,7 +182,7 @@ Routine Description: Status =3D gBS->HandleProtocol ( DeviceHandle, &gEfiSimpleFileSystemProtocolGuid, - &Vol + (VOID **)&Vol ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Handle protocol - %r", Status)); @@ -224,7 +224,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, FileInfoSize, - &FileInfo + (VOID **)&FileInfo ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -451,7 +451,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, mReportBufferMaxSize * sizeof(CHAR16), - &mReportBuffer + (VOID **)&mReportBuffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); @@ -474,7 +474,7 @@ Routine Description: Status =3D gBS->AllocatePool ( EfiBootServicesData, mReportBufferMaxSize * sizeof(CHAR16), - &TempBuffer + (VOID **)&TempBuffer ); if (EFI_ERROR (Status)) { EFI_SCT_DEBUG ((EFI_SCT_D_ERROR, L"Allocate pool - %r", Status)); diff --git a/TestFrameworkPkg/Sct/Report/ReportSupport.h b/TestFrameworkPkg= /Sct/Report/ReportSupport.h index 85a6a33..4909605 100644 --- a/TestFrameworkPkg/Sct/Report/ReportSupport.h +++ b/TestFrameworkPkg/Sct/Report/ReportSupport.h @@ -77,7 +77,7 @@ typedef struct { // typedef struct _EFI_SCT_ASSERTION_INFOR EFI_SCT_ASSERTION_INFOR; =20 -typedef struct _EFI_SCT_ASSERTION_INFOR { +struct _EFI_SCT_ASSERTION_INFOR { EFI_SCT_ASSERTION_INFOR *Next; EFI_SCT_ASSERTION_INFOR *Prev; CHAR16 Index[EFI_SCT_INDEX_LEN]; @@ -90,14 +90,14 @@ typedef struct _EFI_SCT_ASSERTION_INFOR { CHAR16 RuntimeInfor[EFI_SCT_RUNTIME_INFOR_LEN]; CHAR16 DevicePath[EFI_SCT_DEVICE_PATH_LEN]; CHAR16 FileName[EFI_SCT_NAME_LEN]; -} EFI_SCT_ASSERTION_INFOR; +} ; =20 // // EFI_SCT_REPORT_ITEM // typedef struct _EFI_SCT_REPORT_ITEM EFI_SCT_REPORT_ITEM; =20 -typedef struct _EFI_SCT_REPORT_ITEM { +struct _EFI_SCT_REPORT_ITEM { EFI_SCT_REPORT_ITEM *Next; EFI_SCT_REPORT_ITEM *Prev; UINT32 PassNumber; @@ -107,7 +107,7 @@ typedef struct _EFI_SCT_REPORT_ITEM { CHAR16 TestCategory[EFI_SCT_NAME_LEN]; EFI_SCT_ASSERTION_INFOR *FailAssertion; EFI_SCT_ASSERTION_INFOR *PassAssertion; -} EFI_SCT_REPORT_ITEM; +}; =20 // // EFI_SCT_REPORT_INFOR diff --git a/TestFrameworkPkg/Sct/UI/BuildMenu.c b/TestFrameworkPkg/Sct/UI/= BuildMenu.c index af2127e..5d77dd5 100644 --- a/TestFrameworkPkg/Sct/UI/BuildMenu.c +++ b/TestFrameworkPkg/Sct/UI/BuildMenu.c @@ -190,7 +190,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_MENU_PAGE), - &MyPage + (VOID **)&MyPage ); if (EFI_ERROR (Status)) { return Status; @@ -1079,7 +1079,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_ITEM_VALUE_QUEUE), - &TempValueQueue + (VOID **)&TempValueQueue ); if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; @@ -1210,7 +1210,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, sizeof (EFI_SCROLL_BAR), - &ScrollBar + (VOID **)&ScrollBar ); if(!EFI_ERROR (Status)) { ScrollBar->ScrollBarRect.TopLeft.Row =3D Page->Body.SplitPoint.Row + 1= ; diff --git a/TestFrameworkPkg/Sct/UI/ConfigMenu.c b/TestFrameworkPkg/Sct/UI= /ConfigMenu.c index 2ce71c0..8aebf4e 100644 --- a/TestFrameworkPkg/Sct/UI/ConfigMenu.c +++ b/TestFrameworkPkg/Sct/UI/ConfigMenu.c @@ -118,7 +118,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (Page); @@ -224,7 +224,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH + 1) * sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (Page); @@ -257,7 +257,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH + 1) * sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (Page); @@ -297,7 +297,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH + 1) * sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (Page); @@ -342,7 +342,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH + 1) * sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (Page); @@ -375,7 +375,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH + 1) * sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (Page); @@ -550,7 +550,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (MenuPage); @@ -579,7 +579,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (MenuPage); @@ -624,7 +624,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (MenuPage); @@ -653,7 +653,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (MenuPage); @@ -678,7 +678,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (MenuPage); @@ -703,7 +703,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (MenuPage); @@ -728,7 +728,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH+1)*sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (MenuPage); @@ -986,7 +986,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, MAX_STRING_LEN * sizeof (CHAR16), - (void *)&Buffer + (VOID *)&Buffer ); if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; diff --git a/TestFrameworkPkg/Sct/UI/FileDialog.c b/TestFrameworkPkg/Sct/UI= /FileDialog.c index 089c048..c3e7732 100644 --- a/TestFrameworkPkg/Sct/UI/FileDialog.c +++ b/TestFrameworkPkg/Sct/UI/FileDialog.c @@ -1331,7 +1331,7 @@ Returns: EFI_STATUS Status; INTN Ypos; INTN XLeft; - INTN Num; + UINTN Num; EFI_INPUT_KEY Key; volatile INTN Index; BOOLEAN WAITING; diff --git a/TestFrameworkPkg/Sct/UI/KeyFunction.c b/TestFrameworkPkg/Sct/U= I/KeyFunction.c index 13398c9..30e1e8a 100644 --- a/TestFrameworkPkg/Sct/UI/KeyFunction.c +++ b/TestFrameworkPkg/Sct/UI/KeyFunction.c @@ -632,8 +632,8 @@ Returns: INTN Ypos; INTN XLeft; EFI_INPUT_KEY Key; - volatile INTN Index; - INTN WaitIndex; + volatile UINTN Index; + UINTN WaitIndex; BOOLEAN WAITING; CHAR16 Buffer[EFI_MAX_EDIT_LENGTH + 1]; CHAR16 TempStr[EFI_MAX_ITEM_VALUE_LENGTH + 1]; @@ -855,8 +855,8 @@ Returns: =20 WAITING =3D FALSE; MenuItem =3D MenuPage->Body.CurrentSelected; - if (Key.ScanCode =3D=3D SCAN_UP && MenuItem->Prev =3D=3D NULL || - Key.ScanCode =3D=3D SCAN_DOWN && MenuItem->Next =3D=3D NULL) { + if ((Key.ScanCode =3D=3D SCAN_UP && MenuItem->Prev =3D=3D NULL) || + (Key.ScanCode =3D=3D SCAN_DOWN && MenuItem->Next =3D=3D NULL))= { // //no need to call the UpFunc or DownFunc so don't return the sca= ncode // @@ -1748,7 +1748,7 @@ Returns: { EFI_STATUS Status; EFI_INPUT_KEY Key; - INTN Index; + UINTN Index; EFI_HOT_KEY *HotKey; =20 // @@ -2182,7 +2182,7 @@ Returns: INTN XLeft; UINTN X0; EFI_INPUT_KEY Key; - INTN Index; + UINTN Index; BOOLEAN WAITING; BOOLEAN BufferChanged; CHAR16 Buffer[EFI_MAX_ITER_EDIT_LENGTH + 1]; @@ -2307,8 +2307,8 @@ Returns: =20 WAITING =3D FALSE; MenuItem =3D MenuPage->Body.CurrentSelected; - if (Key.ScanCode =3D=3D SCAN_UP && MenuItem->Prev =3D=3D NULL || - Key.ScanCode =3D=3D SCAN_DOWN && MenuItem->Next =3D=3D NULL) { + if ((Key.ScanCode =3D=3D SCAN_UP && MenuItem->Prev =3D=3D NULL) || + (Key.ScanCode =3D=3D SCAN_DOWN && MenuItem->Next =3D=3D NULL))= { // //no need to call the UpFunc or DownFunc so don't return the sca= ncode // diff --git a/TestFrameworkPkg/Sct/UI/LogFileDialog.c b/TestFrameworkPkg/Sct= /UI/LogFileDialog.c index 2eb1bd1..9b16ad8 100644 --- a/TestFrameworkPkg/Sct/UI/LogFileDialog.c +++ b/TestFrameworkPkg/Sct/UI/LogFileDialog.c @@ -1385,7 +1385,7 @@ Returns: EFI_STATUS Status; INTN Ypos; INTN XLeft; - INTN Num; + UINTN Num; EFI_INPUT_KEY Key; volatile INTN Index; BOOLEAN WAITING; diff --git a/TestFrameworkPkg/Sct/UI/TestNodeMenu.c b/TestFrameworkPkg/Sct/= UI/TestNodeMenu.c index 9693aa5..0cdf597 100644 --- a/TestFrameworkPkg/Sct/UI/TestNodeMenu.c +++ b/TestFrameworkPkg/Sct/UI/TestNodeMenu.c @@ -172,7 +172,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_EDIT_LENGTH + 1) * sizeof(CHAR16), - &EditBuffer + (VOID **)&EditBuffer ); if (EFI_ERROR (Status)) { DestroyMenuPage (Page); @@ -513,7 +513,7 @@ Returns: Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_ITER_EDIT_LENGTH + 2) * 2, - &TempString + (VOID **)&TempString ); if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; @@ -1422,7 +1422,7 @@ GetIterString( Status =3D gBS->AllocatePool( EfiBootServicesData, (EFI_MAX_ITER_EDIT_LENGTH + 2) * 2, - &TempString + (VOID **)&TempString ); if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; diff --git a/TestFrameworkPkg/Sct/UI/UI.h b/TestFrameworkPkg/Sct/UI/UI.h index 225acf6..dbd2d41 100644 --- a/TestFrameworkPkg/Sct/UI/UI.h +++ b/TestFrameworkPkg/Sct/UI/UI.h @@ -129,18 +129,18 @@ EFI_STATUS IN UINTN Column ); =20 -typedef struct _EFI_ITEM_VALUE_QUEUE { +struct _EFI_ITEM_VALUE_QUEUE { EFI_ITEM_VALUE_QUEUE *Next; EFI_ITEM_VALUE_QUEUE *Prev; UINT16 *StringValue; UINTN IntValue; -} EFI_ITEM_VALUE_QUEUE; +}; =20 typedef struct _EFI_MENU_ITEM_CONTEXT { EFI_GUID *ItemGuid; } EFI_MENU_ITEM_CONTEXT; =20 -typedef struct _EFI_MENU_ITEM { +struct _EFI_MENU_ITEM { EFI_MENU_ITEM *Next; EFI_MENU_ITEM *Prev; EFI_ITEM_TYPE ItemType; @@ -158,7 +158,7 @@ typedef struct _EFI_MENU_ITEM { EFI_MENU_STRING ItemDesc; DESC_PRINT DescPrint; VOID *Context; // can point to function or data s= truct -} EFI_MENU_ITEM; +}; =20 typedef struct { EFI_RECT ScrollBarRect; @@ -189,21 +189,21 @@ EFI_STATUS IN EFI_MENU_PAGE *MenuPage ); =20 -typedef struct _EFI_HOT_KEY { +struct _EFI_HOT_KEY { EFI_MENU_STRING HotKeyName; EFI_MENU_STRING HotKeyDesc; EFI_INPUT_KEY KeyCode; BOOLEAN Visible; KEY_FUNCTION Context; EFI_HOT_KEY *Next; -} EFI_HOT_KEY; +}; =20 typedef struct { EFI_HOT_KEY *HotKeyList; EFI_RECT FooterRect; } EFI_MENU_FOOTER; =20 -typedef struct _EFI_MENU_PAGE { +struct _EFI_MENU_PAGE { UINTN BackColor; BOOLEAN HasHeader; EFI_MENU_HEADER Header; @@ -212,7 +212,7 @@ typedef struct _EFI_MENU_PAGE { BOOLEAN HasFooter; EFI_MENU_FOOTER Footer; EFI_MENU_PAGE *Parent; -} EFI_MENU_PAGE; +}; =20 EFI_STATUS TestPrintAt ( diff --git a/TestFrameworkPkg/Sct/print.c b/TestFrameworkPkg/Sct/print.c index ee8c6e3..935b3bc 100644 --- a/TestFrameworkPkg/Sct/print.c +++ b/TestFrameworkPkg/Sct/print.c @@ -431,7 +431,7 @@ _PoolCatPrint ( ps.Output =3D Output; ps.Context =3D spc; ps.fmt.u.pw =3D fmt; - ps.args =3D args; + VA_COPY(ps.args, args); _Print (&ps); } =20 @@ -765,7 +765,7 @@ _IPrint ( ps.fmt.u.pc =3D fmta; } =20 - ps.args =3D args; + VA_COPY(ps.args, args); =20 if (Column !=3D (UINTN) -1) { Out->SetCursorPosition(Out, Column, Row); @@ -1352,8 +1352,8 @@ EnablePageBreak ( gST->ConOut->QueryMode ( gST->ConOut, gST->ConOut->Mode->Mode, - &mPrintMode.MaxColumn, - &mPrintMode.MaxRow + (UINTN *)&mPrintMode.MaxColumn, + (UINTN *)&mPrintMode.MaxRow ); =20 mPrintMode.Row =3D StartRow; diff --git a/TestFrameworkPkg/Support/StandardTest/StandardTest.c b/TestFra= meworkPkg/Support/StandardTest/StandardTest.c index dee4d42..8ea22dd 100644 --- a/TestFrameworkPkg/Support/StandardTest/StandardTest.c +++ b/TestFrameworkPkg/Support/StandardTest/StandardTest.c @@ -101,10 +101,6 @@ CHAR16 *DashLine =3D L"-------------------------------= ---------------------------- =20 #define IS_LEAP(y) (((y) % 4) =3D=3D 0 && ((y) % 100) !=3D 0 || ((y) % 400= ) =3D=3D 0) =20 -static const UINTN MonthLengths[2][12] =3D { - { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; =20 #define MINS_PER_HOUR 60 #define HOURS_PER_DAY 24 @@ -162,7 +158,7 @@ StslGuidsDuplicate ( Status =3D gBS->AllocatePool ( EfiBootServicesData, (NoGuids + 1) * sizeof(EFI_GUID), - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { return NULL; @@ -188,7 +184,7 @@ StslStrDuplicate ( Status =3D gBS->AllocatePool ( EfiBootServicesData, (StrLen (String) + 1) * sizeof(CHAR16), - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { return NULL; @@ -199,49 +195,6 @@ StslStrDuplicate ( return Buffer; } =20 -UINT32 -SecondsElapsedFromBaseYear ( - IN UINT16 BaseYear, - IN UINT16 Year, - IN UINT8 Month, - IN UINT8 Day, - IN UINT8 Hour, - IN UINT8 Minute, - IN UINT8 Second - ) -{ - UINTN Seconds; - UINT32 LeapYear; - INTN Index; - - Seconds =3D 0; - for (Index =3D BaseYear; Index < Year; Index ++) { - if (IS_LEAP(Index)) { - Seconds +=3D DAYS_PER_LYEAR * SECS_PER_DAY; - } else { - Seconds +=3D DAYS_PER_NYEAR * SECS_PER_DAY; - } - } - - LeapYear =3D IS_LEAP(Year); - for (Index =3D 0; Index < Month - 1; Index ++) { - Seconds +=3D MonthLengths[LeapYear][Index] * SECS_PER_DAY; - } - - for (Index =3D 0; Index < Day - 1; Index ++) { - Seconds +=3D SECS_PER_DAY; - } - - for (Index =3D 0; Index < Hour; Index ++) { - Seconds +=3D SECS_PER_HOUR; - } - - for (Index =3D 0; Index < Minute; Index ++) { - Seconds +=3D SECS_PER_MIN; - } - - return (UINT32) (Seconds + Second); -} =20 EFI_STATUS StslFreePointer ( @@ -696,7 +649,7 @@ Returns: // Send assertion to remotion computer if the network // record assertion utility installed. // - NetRecordAssertion(Type, EventId, Buffer); + NetRecordAssertion((NET_EFI_TEST_ASSERTION)Type, EventId, Buffer); =20 // // write key file detail line @@ -1575,7 +1528,7 @@ Returns: Status =3D gBS->OpenProtocol ( LibHandle, &gEfiStandardTestLibraryGuid, - &StandardTest, + (VOID **)&StandardTest, TslPrivate->ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL @@ -1632,7 +1585,7 @@ Returns: Status =3D gBS->OpenProtocol ( ImageHandle, &gEfiTslInitInterfaceGuid, - &TslInit, + (VOID **)&TslInit, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL diff --git a/TestFrameworkPkg/Support/TestLogging/TestLogging.c b/TestFrame= workPkg/Support/TestLogging/TestLogging.c index 0384a75..703aae9 100644 --- a/TestFrameworkPkg/Support/TestLogging/TestLogging.c +++ b/TestFrameworkPkg/Support/TestLogging/TestLogging.c @@ -275,7 +275,7 @@ TllStrDuplicate ( Status =3D gBS->AllocatePool ( EfiBootServicesData, (StrLen (String) + 1) * sizeof(CHAR16), - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { return NULL; @@ -311,7 +311,7 @@ TllGuidsDuplicate ( Status =3D gBS->AllocatePool ( EfiBootServicesData, (NoGuids + 1) * sizeof(EFI_GUID), - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { return NULL; @@ -1058,7 +1058,7 @@ Returns: Status =3D gBS->OpenProtocol ( LibHandle, &gEfiTestLoggingLibraryGuid, - &TestLogging, + (VOID **)&TestLogging, TslPrivate->ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL @@ -1113,7 +1113,7 @@ Returns: Status =3D gBS->OpenProtocol ( ImageHandle, &gEfiTslInitInterfaceGuid, - &TslInit, + (VOID **)&TslInit, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL diff --git a/TestFrameworkPkg/Support/TestProfile/TestProfile.c b/TestFrame= workPkg/Support/TestProfile/TestProfile.c index e522e2a..ca405d3 100644 --- a/TestFrameworkPkg/Support/TestProfile/TestProfile.c +++ b/TestFrameworkPkg/Support/TestProfile/TestProfile.c @@ -54,20 +54,20 @@ typedef struct { typedef struct _INI INI; typedef struct _COMMENTLINE COMMENTLINE; =20 -typedef struct _INI { +struct _INI { UINT32 commentNo; CHAR8 *ptrSection; CHAR8 *ptrEntry; CHAR8 *ptrValue; INI *ptrNext; -} INI; +}; =20 =20 -typedef struct _COMMENTLINE { +struct _COMMENTLINE { UINT32 commentNo; CHAR8 *ptrComment; COMMENTLINE *ptrNext; -} COMMENTLINE; +}; =20 typedef struct { UINT32 Signature; @@ -855,7 +855,7 @@ TplStrDuplicate ( Status =3D gBS->AllocatePool ( EfiBootServicesData, (StrLen (String) + 1) * sizeof(CHAR16), - &Buffer + (VOID **)&Buffer ); if (EFI_ERROR (Status)) { return NULL; @@ -2711,7 +2711,7 @@ Returns: Status =3D gBS->OpenProtocol ( LibHandle, &gEfiTestProfileLibraryGuid, - &TestProfile, + (VOID **)&TestProfile, TslPrivate->ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL @@ -2764,7 +2764,7 @@ Returns: Status =3D gBS->OpenProtocol ( ImageHandle, &gEfiTslInitInterfaceGuid, - &TslInit, + (VOID **)&TslInit, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL diff --git a/TestFrameworkPkg/Support/TestRecovery/TestRecovery.c b/TestFra= meworkPkg/Support/TestRecovery/TestRecovery.c index d6ace76..fadedf4 100644 --- a/TestFrameworkPkg/Support/TestRecovery/TestRecovery.c +++ b/TestFrameworkPkg/Support/TestRecovery/TestRecovery.c @@ -362,7 +362,7 @@ Returns: Status =3D gBS->AllocatePool ( EfiBootServicesData, (StrLen (FileName) + 1) * 2, - &(Private->FileName) + (VOID **)&(Private->FileName) ); if (EFI_ERROR (Status)) { TrlFreePointer (Private); @@ -505,7 +505,7 @@ Returns: Status =3D gBS->OpenProtocol ( LibHandle, &gEfiTestRecoveryLibraryGuid, - &TestRecovery, + (VOID **)&TestRecovery, TslPrivate->ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL @@ -560,7 +560,7 @@ Returns: Status =3D gBS->OpenProtocol ( ImageHandle, &gEfiTslInitInterfaceGuid, - &TslInit, + (VOID **)&TslInit, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL diff --git a/TestFrameworkPkg/TestFrameworkPkg.dsc b/TestFrameworkPkg/TestF= rameworkPkg.dsc index 6bbc126..93c8886 100644 --- a/TestFrameworkPkg/TestFrameworkPkg.dsc +++ b/TestFrameworkPkg/TestFrameworkPkg.dsc @@ -79,4 +79,4 @@ TestFrameworkPkg/PeiSctManageModule/PeiSctManageModule.inf =20 [BuildOptions] - *_*_*_CC_FLAGS =3D /FAsc + MSFT:*_*_*_CC_FLAGS =3D /FAsc --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:24:40 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1485942578067766.1859396286573; Wed, 1 Feb 2017 01:49:38 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AAB3581FB5; Wed, 1 Feb 2017 01:49:31 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 393E081FAB for ; Wed, 1 Feb 2017 01:49:30 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 01 Feb 2017 01:49:30 -0800 Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.89.179]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2017 01:49:29 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,319,1477983600"; d="scan'208";a="59876491" From: Michael Kinney To: edk2-devel@lists.01.org Date: Wed, 1 Feb 2017 01:49:09 -0800 Message-Id: <1485942552-47388-4-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> References: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [staging/edk2-test PATCH V2 3/6] TestFrameworkPkg: Fix VS2015 compatibility issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Fish MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Andrew Fish Cc: Supreeth Venkatesh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney Reviewed-by: Supreeth Venkatesh --- TestFrameworkPkg/Sct/Execute/ExecuteSupport.c | 17 ----------------- TestFrameworkPkg/Sct/UI/KeyFunction.c | 14 +++++++------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c b/TestFrameworkP= kg/Sct/Execute/ExecuteSupport.c index 43b117d..8036050 100644 --- a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c +++ b/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c @@ -647,23 +647,6 @@ DeviceConfigGetString ( } =20 =20 -EFI_STATUS -DeviceConfigSetString ( - IN EFI_INI_FILE_HANDLE IniFile, - IN UINT32 Order, - IN CHAR16 *Key, - IN CHAR16 *Buffer - ) -{ - return IniFile->SetStringByOrder ( - IniFile, - Order, - EFI_SCT_SECTION_DEVICE_CONFIG, - Key, - Buffer - ); -} - STATIC VOID InsertChildHandles ( diff --git a/TestFrameworkPkg/Sct/UI/KeyFunction.c b/TestFrameworkPkg/Sct/U= I/KeyFunction.c index 30e1e8a..34e683f 100644 --- a/TestFrameworkPkg/Sct/UI/KeyFunction.c +++ b/TestFrameworkPkg/Sct/UI/KeyFunction.c @@ -637,11 +637,11 @@ Returns: BOOLEAN WAITING; CHAR16 Buffer[EFI_MAX_EDIT_LENGTH + 1]; CHAR16 TempStr[EFI_MAX_ITEM_VALUE_LENGTH + 1]; - INTN XOffSetInScreen; - INTN XOffSetInBuffer; - INTN FirstInDisplay; - INTN LastInDisplay; - INTN CurrentLength; + UINTN XOffSetInScreen; + UINTN XOffSetInBuffer; + UINTN FirstInDisplay; + UINTN LastInDisplay; + UINTN CurrentLength; UINTN TempValue; EFI_DIALOG_CONTEXT MsgDialogContext; CHAR16 *MsgDialogTitle; @@ -2187,8 +2187,8 @@ Returns: BOOLEAN BufferChanged; CHAR16 Buffer[EFI_MAX_ITER_EDIT_LENGTH + 1]; CHAR16 TempStr[EFI_MAX_ITER_EDIT_LENGTH + 1]; - INTN XOffSetInBuffer; - INTN CurrentLength; + UINTN XOffSetInBuffer; + UINTN CurrentLength; UINT32 TempValue; =20 // --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:24:40 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1485942581299893.9980625140722; Wed, 1 Feb 2017 01:49:41 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E4DB581F87; Wed, 1 Feb 2017 01:49:33 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 1244681FAB for ; Wed, 1 Feb 2017 01:49:31 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 01 Feb 2017 01:49:30 -0800 Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.89.179]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2017 01:49:30 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,319,1477983600"; d="scan'208";a="59876493" From: Michael Kinney To: edk2-devel@lists.01.org Date: Wed, 1 Feb 2017 01:49:10 -0800 Message-Id: <1485942552-47388-5-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> References: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [staging/edk2-test PATCH V2 4/6] TestFrameworkPkg: Fix GCC compatibility issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Fish MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Andrew Fish Cc: Supreeth Venkatesh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- TestFrameworkPkg/Eftp/ComponentName.c | 4 + TestFrameworkPkg/Eftp/EftpDriver.h | 5 + TestFrameworkPkg/Eftp/EftpMain.c | 2 + TestFrameworkPkg/Eftp/EftpPacket.c | 2 - TestFrameworkPkg/Eftp/EftpRRQ.c | 13 +- TestFrameworkPkg/Eftp/EftpRRQ.h | 8 +- TestFrameworkPkg/Eftp/EftpWRQ.c | 7 +- TestFrameworkPkg/Eftp/EftpWRQ.h | 2 + TestFrameworkPkg/Include/Library/EntsLib.h | 225 ------- TestFrameworkPkg/Include/Protocol/WBTest.h | 84 --- TestFrameworkPkg/Include/Protocol/WbTest.h | 84 +++ TestFrameworkPkg/InstallSct/InstallSct.c | 15 +- TestFrameworkPkg/Library/EasLib/EntsContext.c | 83 +-- TestFrameworkPkg/Library/EasLib/EntsDpath.c | 60 +- TestFrameworkPkg/Library/EasLib/EntsGuid.c | 113 ++-- TestFrameworkPkg/Library/EasLib/EntsLib.c | 21 +- TestFrameworkPkg/Library/EasLib/EntsLib.inf | 1 + TestFrameworkPkg/Library/EasLib/EntsStr.c | 690 -----------------= ---- TestFrameworkPkg/Library/EasLib/EntsSupport.c | 11 +- TestFrameworkPkg/Library/EasLib/EntsTime.c | 2 +- TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c | 4 + .../IP4NetworkMonitor/IP4NetworkMonitor.c | 30 +- .../IP4NetworkMonitor/IP4NetworkMonitor.h | 8 +- .../ManagedNetworkMonitor/ManagedNetworkMonitor.c | 25 +- .../ManagedNetworkMonitor/ManagedNetworkMonitor.h | 6 + .../PeiSctManageModule/PeiSctManageModule.c | 15 +- TestFrameworkPkg/Sct/Core/SctInit.c | 2 - TestFrameworkPkg/Sct/Data/TestCaseEx.c | 2 - TestFrameworkPkg/Sct/Data/TestNode.c | 2 - TestFrameworkPkg/Sct/ENTS/EasDispatcher/Core/Eas.c | 3 - .../Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c | 3 +- .../Sct/ENTS/EasDispatcher/Rivl/RivlType.c | 8 +- .../Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c | 9 +- TestFrameworkPkg/Sct/Execute/Execute.c | 5 - TestFrameworkPkg/Sct/Execute/ExecuteSupport.c | 1 + TestFrameworkPkg/Sct/Execute/ExecuteSupport.h | 1 + TestFrameworkPkg/Sct/Include/SctCore.h | 1 + TestFrameworkPkg/Sct/Include/SctDef.h | 2 +- TestFrameworkPkg/Sct/Misc/SctMisc.c | 2 +- TestFrameworkPkg/Sct/UI/BuildMenu.c | 2 + TestFrameworkPkg/Sct/UI/BuildMenu.h | 11 +- TestFrameworkPkg/Sct/UI/ConfigMenu.c | 23 +- TestFrameworkPkg/Sct/UI/Dialog.h | 2 +- TestFrameworkPkg/Sct/UI/DisplayUi.c | 14 +- TestFrameworkPkg/Sct/UI/FileDialog.c | 2 - TestFrameworkPkg/Sct/UI/FileDialog.h | 2 +- TestFrameworkPkg/Sct/UI/KeyFunction.c | 18 + TestFrameworkPkg/Sct/UI/LogFileDialog.c | 4 +- TestFrameworkPkg/Sct/UI/LogFileDialog.h | 2 +- TestFrameworkPkg/Sct/UI/MainMenu.c | 18 + TestFrameworkPkg/Sct/UI/TestNodeMenu.c | 12 + TestFrameworkPkg/Sct/UI/TestNodeMenu.h | 2 +- TestFrameworkPkg/Sct/UI/UI.h | 16 + .../Support/StandardTest/StandardTest.c | 34 +- TestFrameworkPkg/Support/TestLogging/TestLogging.c | 17 +- TestFrameworkPkg/Support/TestProfile/TestProfile.c | 658 ++++++-----------= --- .../Support/TestProfile/TestProfile.inf | 1 + 57 files changed, 614 insertions(+), 1785 deletions(-) delete mode 100644 TestFrameworkPkg/Include/Protocol/WBTest.h create mode 100644 TestFrameworkPkg/Include/Protocol/WbTest.h diff --git a/TestFrameworkPkg/Eftp/ComponentName.c b/TestFrameworkPkg/Eftp/= ComponentName.c index 7956658..3ab1bfc 100644 --- a/TestFrameworkPkg/Eftp/ComponentName.c +++ b/TestFrameworkPkg/Eftp/ComponentName.c @@ -17,6 +17,7 @@ // EFI Component Name Functions // EFI_STATUS +EFIAPI EftpComponentNameGetDriverName ( IN EFI_COMPONENT_NAME2_PROTOCOL *This, IN CHAR8 *Language, @@ -24,6 +25,7 @@ EftpComponentNameGetDriverName ( ); =20 EFI_STATUS +EFIAPI EftpComponentNameGetControllerName ( IN EFI_COMPONENT_NAME2_PROTOCOL *= This, IN EFI_HANDLE C= ontrollerHandle, @@ -53,6 +55,7 @@ static EFI_UNICODE_STRING_TABLE mEftpDriverNameTable[] = =3D { }; =20 EFI_STATUS +EFIAPI EftpComponentNameGetDriverName ( IN EFI_COMPONENT_NAME2_PROTOCOL *This, IN CHAR8 *Language, @@ -94,6 +97,7 @@ EftpComponentNameGetDriverName ( } =20 EFI_STATUS +EFIAPI EftpComponentNameGetControllerName ( IN EFI_COMPONENT_NAME2_PROTOCOL *= This, IN EFI_HANDLE C= ontrollerHandle, diff --git a/TestFrameworkPkg/Eftp/EftpDriver.h b/TestFrameworkPkg/Eftp/Eft= pDriver.h index a6fac3f..4bcefbe 100644 --- a/TestFrameworkPkg/Eftp/EftpDriver.h +++ b/TestFrameworkPkg/Eftp/EftpDriver.h @@ -80,6 +80,7 @@ typedef struct _EFTP_SERVICE_BINDING_PRIVATE { } EFTP_SERVICE_BINDING_PRIVATE; =20 EFI_STATUS +EFIAPI EftpDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, @@ -106,6 +107,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI EftpDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, @@ -133,6 +135,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI EftpDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, @@ -160,6 +163,7 @@ EftpDriverBindingStop ( ; =20 EFI_STATUS +EFIAPI EftpServiceBindingCreateChild ( IN EFI_SERVICE_BINDING_PROTOCOL *This, IN OUT EFI_HANDLE *ChildHandle @@ -185,6 +189,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI EftpServiceBindingDestroyChild ( IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle diff --git a/TestFrameworkPkg/Eftp/EftpMain.c b/TestFrameworkPkg/Eftp/EftpM= ain.c index f9e84c5..e88dfe8 100644 --- a/TestFrameworkPkg/Eftp/EftpMain.c +++ b/TestFrameworkPkg/Eftp/EftpMain.c @@ -458,6 +458,7 @@ CleanUp: } =20 EFI_STATUS +EFIAPI EftpReadFile ( IN EFI_EFTP_PROTOCOL *This, IN EFI_EFTP_TOKEN *Token @@ -581,6 +582,7 @@ Returns: } =20 EFI_STATUS +EFIAPI EftpConfigure ( IN EFI_EFTP_PROTOCOL *This, IN EFI_EFTP_CONFIG_DATA *EftpConfigData // OPTIONAL diff --git a/TestFrameworkPkg/Eftp/EftpPacket.c b/TestFrameworkPkg/Eftp/Eft= pPacket.c index 1c813f0..f403e4a 100644 --- a/TestFrameworkPkg/Eftp/EftpPacket.c +++ b/TestFrameworkPkg/Eftp/EftpPacket.c @@ -565,7 +565,6 @@ Returns: EFI_EFTP_PACKET *Packet; EFI_STATUS Status; UINT32 Len; - CHAR8 *P; =20 ASSERT (Private && Err); =20 @@ -581,7 +580,6 @@ Returns: } =20 Packet =3D Buf->Packet; - P =3D AsciiStrCpy (Packet->Error.ErrorMessage, Err->Desc); =20 Status =3D gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, diff --git a/TestFrameworkPkg/Eftp/EftpRRQ.c b/TestFrameworkPkg/Eftp/EftpRR= Q.c index 9c6d952..4bf15f7 100644 --- a/TestFrameworkPkg/Eftp/EftpRRQ.c +++ b/TestFrameworkPkg/Eftp/EftpRRQ.c @@ -55,6 +55,7 @@ EftpListIntegrityCheck ( =20 STATIC VOID +EFIAPI EftpRrqTxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -156,6 +157,7 @@ Returns: } =20 VOID +EFIAPI EftpRrqRxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -527,6 +529,7 @@ Returns: } =20 VOID +EFIAPI EftpRrqTimer ( IN EFI_EVENT Event, IN VOID *Context @@ -664,6 +667,7 @@ Returns: =20 STATIC VOID +EFIAPI EftpRrqTxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -763,7 +767,6 @@ Returns: =20 --*/ { - EFTP_OPTION *Opt; EFTP_RRQ_STATE *Rrq; EFTP_PACKET_BUFFER *Buf; BOOLEAN Copy; @@ -773,7 +776,6 @@ Returns: ASSERT (Private && Private->RrqState && Packet); =20 Rrq =3D Private->RrqState; - Opt =3D &Private->Option; =20 // // Ignore the data packet with wrong opcode @@ -1081,6 +1083,7 @@ Returns: =20 STATIC VOID +EFIAPI EftpRrqInitTimer ( IN EFI_EVENT Event, IN VOID *Context @@ -1203,8 +1206,6 @@ Returns: =20 --*/ { - EFTP_OPTION *Opt; - EFTP_RRQ_STATE *Rrq; EFTP_PACKET_BUFFER *Buf; EFTP_ERRINFO Err; EFI_STATUS Status; @@ -1213,9 +1214,6 @@ Returns: =20 ASSERT (Private && Private->RrqState && Packet); =20 - Rrq =3D Private->RrqState; - Opt =3D &Private->Option; - // // Ignore the data packet with wrong opcode // @@ -1503,6 +1501,7 @@ Returns: =20 STATIC VOID +EFIAPI EftpRrqActiveTimer ( IN EFI_EVENT Event, IN VOID *Context diff --git a/TestFrameworkPkg/Eftp/EftpRRQ.h b/TestFrameworkPkg/Eftp/EftpRR= Q.h index 16008f9..6bb6c85 100644 --- a/TestFrameworkPkg/Eftp/EftpRRQ.h +++ b/TestFrameworkPkg/Eftp/EftpRRQ.h @@ -146,6 +146,7 @@ Returns: ; =20 VOID +EFIAPI EftpRrqRxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -169,7 +170,12 @@ Returns: --*/ ; =20 -VOID EftpRrqTimer (IN EFI_EVENT Event, IN VOID *Context) +VOID +EFIAPI +EftpRrqTimer ( + IN EFI_EVENT Event, + IN VOID *Context + ) /*++ =20 Routine Description: diff --git a/TestFrameworkPkg/Eftp/EftpWRQ.c b/TestFrameworkPkg/Eftp/EftpWR= Q.c index 495b2a2..10d38a1 100644 --- a/TestFrameworkPkg/Eftp/EftpWRQ.c +++ b/TestFrameworkPkg/Eftp/EftpWRQ.c @@ -16,6 +16,7 @@ =20 STATIC VOID +EFIAPI EftpWrqTxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -143,6 +144,7 @@ Returns: } =20 VOID +EFIAPI EftpWrqRxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -400,6 +402,7 @@ CleanUp: =20 STATIC VOID +EFIAPI EftpWrqTxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -472,6 +475,7 @@ Returns: } =20 VOID +EFIAPI EftpWrqTimer ( IN EFI_EVENT Event, IN VOID *Context @@ -654,7 +658,6 @@ Returns: --*/ { EFI_STATUS Status; - EFTP_OPTION *Opt; UINT64 AckNo; EFTP_ERRINFO Err; EFTP_PACKET_BUFFER *Buf; @@ -662,8 +665,6 @@ Returns: =20 ASSERT (Private && Private->WrqState && Packet); =20 - Opt =3D &Private->Option; - // // Ignore the ACK packet with wrong opcode // diff --git a/TestFrameworkPkg/Eftp/EftpWRQ.h b/TestFrameworkPkg/Eftp/EftpWR= Q.h index 55585e2..4201bf9 100644 --- a/TestFrameworkPkg/Eftp/EftpWRQ.h +++ b/TestFrameworkPkg/Eftp/EftpWRQ.h @@ -67,6 +67,7 @@ Returns: ; =20 VOID +EFIAPI EftpWrqRxCallback ( IN EFI_EVENT Event, IN VOID *Context @@ -113,6 +114,7 @@ Returns: ; =20 VOID +EFIAPI EftpWrqTimer ( IN EFI_EVENT Event, IN VOID *Context diff --git a/TestFrameworkPkg/Include/Library/EntsLib.h b/TestFrameworkPkg/= Include/Library/EntsLib.h index 03cfcab..c324765 100644 --- a/TestFrameworkPkg/Include/Library/EntsLib.h +++ b/TestFrameworkPkg/Include/Library/EntsLib.h @@ -247,29 +247,6 @@ EntsStrDuplicate ( ) ; =20 -INTN -EntsLibStubStriCmp ( - IN EFI_UNICODE_COLLATION_PROTOCOL *This, - IN CHAR16 *s1, - IN CHAR16 *s2 - ) -; - -VOID -EntsLibStubStrLwrUpr ( - IN EFI_UNICODE_COLLATION_PROTOCOL *This, - IN CHAR16 *Str - ) -; - -BOOLEAN -EntsLibStubMetaiMatch ( - IN EFI_UNICODE_COLLATION_PROTOCOL *This, - IN CHAR16 *String, - IN CHAR16 *Pattern - ) -; - EFI_STATUS Char16ToChar8 ( IN CHAR16 *Src, @@ -361,23 +338,6 @@ strtok_line ( ; =20 CHAR16 * -strtok_arg ( - CHAR16 *s, - const CHAR16 *ct - ) -/*++ - -Routine Description: - - Find the next token in a string - Tokens are separated by separators defined in "ct" - If enclosed in double quotations, other separators are invalid. Then tok= en is - the content in the quotations. - ---*/ -; - -CHAR16 * strtok_field ( CHAR16 *s, const CHAR16 *ct @@ -406,30 +366,6 @@ EntsHexStrToUINTN ( ; =20 EFI_STATUS -EntsStrToValue ( - IN CHAR16 *Buffer, - OUT UINTN *Value - ) -/*++ - -Routine Description: - - Convert a string to a value. - -Arguments: - - Buffer - String buffer. - Value - Pointer to receive the converted value. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -; - -EFI_STATUS EntsValueToStr ( IN UINTN Value, OUT CHAR16 *Buffer @@ -453,103 +389,6 @@ Returns: --*/ ; =20 -EFI_STATUS -EntsHexValueToStr ( - IN UINTN Value, - OUT CHAR16 *Buffer - ) -/*++ - -Routine Description: - - Convert a hexadecimal value to a string. - -Arguments: - - Value - Value to be converted. - Buffer - Pointer to string receive buffer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -; - -EFI_STATUS -EntsStrToHexValue ( - IN CHAR16 *Buffer, - OUT UINTN *Value - ) -/*++ - -Routine Description: - - Convert a string to a hexadecimal value. - -Arguments: - - Buffer - String buffer to be converted. - Value - Receive value pointer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -; - -EFI_STATUS -EntsBooleanToStr ( - IN BOOLEAN Value, - OUT CHAR16 *Buffer - ) -/*++ - -Routine Description: - - Convert a boolean to a string. - -Arguments: - - Value - Boolean value. - Buffer - Receive string buffer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -; - -EFI_STATUS -EntsStrToBoolean ( - IN CHAR16 *Buffer, - OUT BOOLEAN *Value - ) -/*++ - -Routine Description: - - Convert a string to a boolean. - -Arguments: - - Buffer - String buffer to be converted. - Value - Receive value pointer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_UNSUPPORTED - String not supported. - EFI_SUCCESS - Operation succeeded. - ---*/ -; - BOOLEAN EntsStrBeginWith ( IN CHAR16 *Str, @@ -581,12 +420,6 @@ Returns: --*/ ; =20 -CHAR16 * -EntsStrChr ( - IN CHAR16 *Str, - IN CHAR16 c - ); - UINTN EntsStrStr ( IN CHAR16 *Str, @@ -611,70 +444,12 @@ Returns: --*/ ; =20 -UINTN -HexStringToValue ( - IN CHAR16 *String, - IN UINTN Length - ) -/*++ - -Routine Description: - - Convert a hex string to a value. - -Arguments: - - String - Hex string buffer. - Length - Hex string length. - -Returns: - - Converted value. - ---*/ -; - INTN a2i ( IN CHAR16 Ch ) ; =20 -CHAR16 -i2A ( - UINTN x - ) -; - -CHAR16 -i2a ( - UINTN x - ) -; - -EFI_STATUS -EntsIpToStr ( - IN EFI_IP_ADDRESS *IpAddr, - IN UINTN StrSize, - IN OUT CHAR16 *Str - ) -; - -EFI_STATUS -EntsStrToMac ( - IN CHAR16 *Str, - IN OUT EFI_MAC_ADDRESS *MacAddr - ) -; - -EFI_STATUS -EntsMacToStr ( - IN EFI_MAC_ADDRESS *MacAddr, - IN UINTN StrSize, - IN OUT CHAR16 *Str - ) -; - EFI_STATUS EntsTimeToStr ( IN EFI_TIME *Time, diff --git a/TestFrameworkPkg/Include/Protocol/WBTest.h b/TestFrameworkPkg/= Include/Protocol/WBTest.h deleted file mode 100644 index b85b6ae..0000000 --- a/TestFrameworkPkg/Include/Protocol/WBTest.h +++ /dev/null @@ -1,84 +0,0 @@ -/** @file - This file defines the EFI White-Box Test Protocol. - - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - -**/ - -#ifndef _EFI_WB_TEST_H_ -#define _EFI_WB_TEST_H_ - -// -// Includes -// -#include - -// -// EFI White-Box Test Protocol Definitions -// - -#define EFI_WB_TEST_GUID \ - { 0x0B486CED, 0x25EB, 0x448a, {0xB2, 0xB2, 0x22, 0x4E, 0x7A, 0x20, 0xCF,= 0x57 } } - -#define EFI_WB_TEST_REVISION 0x00010000 - -// -// Forward reference for pure ANSI compatibility -// -typedef struct _EFI_WB_TEST_ENTRY EFI_WB_TEST_ENTRY; -typedef struct _EFI_WB_TEST_PROTOCOL EFI_WB_TEST_PROTOCOL; - -// -// EFI White-Box Test Entry Point -// - -typedef -EFI_STATUS -(EFIAPI *EFI_WB_ENTRY_POINT) ( - IN EFI_WB_TEST_PROTOCOL *This, - IN EFI_TEST_LEVEL TestLevel, - IN EFI_HANDLE SupportHandle - ); - -// -// EFI White-Box Test Entry -// - -struct _EFI_WB_TEST_ENTRY { - EFI_WB_TEST_ENTRY *Next; - EFI_GUID EntryId; - CHAR16 *Name; - CHAR16 *Description; - EFI_TEST_LEVEL TestLevelSupportMap; - EFI_GUID *SupportProtocols; - EFI_TEST_ATTRIBUTE CaseAttribute; - EFI_WB_ENTRY_POINT EntryPoint; -} ; - -// -// EFI White-Box Test Protocol -// - -struct _EFI_WB_TEST_PROTOCOL { - UINT64 TestRevision; - EFI_GUID CategoryGuid; - EFI_HANDLE ClientHandle; - CHAR16 *Name; - CHAR16 *Description; - EFI_WB_TEST_ENTRY *EntryList; -}; - -// -// Global ID for EFI White-Box Test Protocol -// - -extern EFI_GUID gEfiWbTestGuid; - -#endif diff --git a/TestFrameworkPkg/Include/Protocol/WbTest.h b/TestFrameworkPkg/= Include/Protocol/WbTest.h new file mode 100644 index 0000000..b85b6ae --- /dev/null +++ b/TestFrameworkPkg/Include/Protocol/WbTest.h @@ -0,0 +1,84 @@ +/** @file + This file defines the EFI White-Box Test Protocol. + + Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + +**/ + +#ifndef _EFI_WB_TEST_H_ +#define _EFI_WB_TEST_H_ + +// +// Includes +// +#include + +// +// EFI White-Box Test Protocol Definitions +// + +#define EFI_WB_TEST_GUID \ + { 0x0B486CED, 0x25EB, 0x448a, {0xB2, 0xB2, 0x22, 0x4E, 0x7A, 0x20, 0xCF,= 0x57 } } + +#define EFI_WB_TEST_REVISION 0x00010000 + +// +// Forward reference for pure ANSI compatibility +// +typedef struct _EFI_WB_TEST_ENTRY EFI_WB_TEST_ENTRY; +typedef struct _EFI_WB_TEST_PROTOCOL EFI_WB_TEST_PROTOCOL; + +// +// EFI White-Box Test Entry Point +// + +typedef +EFI_STATUS +(EFIAPI *EFI_WB_ENTRY_POINT) ( + IN EFI_WB_TEST_PROTOCOL *This, + IN EFI_TEST_LEVEL TestLevel, + IN EFI_HANDLE SupportHandle + ); + +// +// EFI White-Box Test Entry +// + +struct _EFI_WB_TEST_ENTRY { + EFI_WB_TEST_ENTRY *Next; + EFI_GUID EntryId; + CHAR16 *Name; + CHAR16 *Description; + EFI_TEST_LEVEL TestLevelSupportMap; + EFI_GUID *SupportProtocols; + EFI_TEST_ATTRIBUTE CaseAttribute; + EFI_WB_ENTRY_POINT EntryPoint; +} ; + +// +// EFI White-Box Test Protocol +// + +struct _EFI_WB_TEST_PROTOCOL { + UINT64 TestRevision; + EFI_GUID CategoryGuid; + EFI_HANDLE ClientHandle; + CHAR16 *Name; + CHAR16 *Description; + EFI_WB_TEST_ENTRY *EntryList; +}; + +// +// Global ID for EFI White-Box Test Protocol +// + +extern EFI_GUID gEfiWbTestGuid; + +#endif diff --git a/TestFrameworkPkg/InstallSct/InstallSct.c b/TestFrameworkPkg/In= stallSct/InstallSct.c index b6a2298..e4d9654 100644 --- a/TestFrameworkPkg/InstallSct/InstallSct.c +++ b/TestFrameworkPkg/InstallSct/InstallSct.c @@ -152,7 +152,6 @@ RemoveDirFile ( IN CHAR16 *Path ) { - EFI_STATUS Status; EFI_STATUS ExecuteStatus; CHAR16 *CmdLine; =20 @@ -175,13 +174,13 @@ RemoveDirFile ( // Execute this shell command // Print (L"ShellExecute %s\n", CmdLine); - Status =3D ShellExecute ( - &gImageHandle, - CmdLine, - FALSE, - NULL, - &ExecuteStatus - ); + ShellExecute ( + &gImageHandle, + CmdLine, + FALSE, + NULL, + &ExecuteStatus + ); if (EFI_ERROR (ExecuteStatus)) { Print (L"Error: Could not execute \"%s\"\n", CmdLine); } diff --git a/TestFrameworkPkg/Library/EasLib/EntsContext.c b/TestFrameworkP= kg/Library/EasLib/EntsContext.c index 0433877..f3072a3 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsContext.c +++ b/TestFrameworkPkg/Library/EasLib/EntsContext.c @@ -94,65 +94,6 @@ _RecordListPrint( #define RecordListPrint(RecordList) #endif =20 -/*--------------------------Internal string library function--------------= -------------*/ -STATIC -UINTN -strlen( - CHAR8 *str - ) -{ - CHAR8 *s; - - for (s =3D str; *s; ++s) - ; - return (UINTN)(s - str); -} - -STATIC -CHAR8 * -strcpy( - CHAR8 *to, - CHAR8 *from - ) -{ - CHAR8 *save; - - save =3D to; - for (; (*to =3D *from) !=3D 0 ; ++from, ++to) - ; - return(save); -} - -STATIC -INTN -strcmp( - CHAR8 *s1, - CHAR8 *s2 - ) -{ - while (*s1 =3D=3D *s2++) { - if (*s1++ =3D=3D 0) - return 0; - } - return (*s1 - *s2 - 1); -} - -STATIC -CHAR8 * -strchr ( - CHAR8 *p, - INTN ch - ) -{ - for (; ; ++p) { - if (*p =3D=3D ch) - return((CHAR8 *)p); - if (!*p) - return((CHAR8 *)NULL); - } - /* NOTREACHED */ -} - /*------------------------------------------------------------------------= -------------*/ STATIC EFI_STATUS @@ -188,7 +129,7 @@ ParseRecordLine ( VOID *ValueBuf; UINTN ValueSize; =20 - TmpStr =3D strchr(LineBuf, '|'); + TmpStr =3D AsciiStrStr(LineBuf, "|"); if (TmpStr =3D=3D NULL) { return EFI_INVALID_PARAMETER; } @@ -197,7 +138,7 @@ ParseRecordLine ( if (KeyBuf =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - strcpy (KeyBuf, LineBuf); + AsciiStrCpy (KeyBuf, LineBuf); TmpStr++; CopyMem(&ValueSize, TmpStr, sizeof(UINTN)); ValueBuf =3D (VOID *)AllocateZeroPool (ValueSize); @@ -347,8 +288,8 @@ WriteRecordsToFile( FileHandle =3D Context->FileHandle; =20 for (Record =3D RecordListHead; Record !=3D NULL; Record =3D Record->Nex= t) { - strcpy(Buffer, Record->Key); - Index =3D strlen(Record->Key); + AsciiStrCpy(Buffer, Record->Key); + Index =3D AsciiStrLen(Record->Key); Buffer[Index++] =3D '|'; CopyMem(Buffer + Index, &Record->Size, sizeof(UINTN)); Index +=3D sizeof(UINTN); @@ -385,7 +326,7 @@ SetRecord ( } =20 for (Record =3D RecordListHead; Record !=3D NULL; Record =3D Record->Nex= t) { - if (strcmp(Key, Record->Key) =3D=3D 0) { + if (AsciiStrCmp(Key, Record->Key) =3D=3D 0) { break; } } @@ -400,7 +341,7 @@ SetRecord ( Status =3D EFI_OUT_OF_RESOURCES; goto FreeAndReturn; } - KeyBuf =3D (CHAR8 *)AllocateZeroPool (strlen(Key) + 1); + KeyBuf =3D (CHAR8 *)AllocateZeroPool (AsciiStrLen(Key) + 1); if (KeyBuf =3D=3D NULL) { FreePool(Record); Status =3D EFI_OUT_OF_RESOURCES; @@ -413,7 +354,7 @@ SetRecord ( Status =3D EFI_OUT_OF_RESOURCES; goto FreeAndReturn; } - strcpy(KeyBuf, Key); + AsciiStrCpy(KeyBuf, Key); CopyMem(ValueBuf, RecordValue, RecordSize); Record->Key =3D KeyBuf; Record->Size =3D RecordSize; @@ -476,7 +417,7 @@ GetRecord ( // the records in the list are same as the ones in file // for (Record =3D RecordListHead; Record !=3D NULL; Record =3D Record->Nex= t) { - if (strcmp(Record->Key, Key) =3D=3D 0) { + if (AsciiStrCmp(Record->Key, Key) =3D=3D 0) { break; } } @@ -526,12 +467,12 @@ DelRecord ( if (RecordListHead =3D=3D NULL) { return EFI_NOT_FOUND; } else { - if (strcmp(Key, RecordListHead->Key) =3D=3D 0) { + if (AsciiStrCmp(Key, RecordListHead->Key) =3D=3D 0) { Record =3D RecordListHead; RecordListHead =3D RecordListHead->Next; } else { for (Record =3D RecordListHead; Record->Next !=3D NULL; Record =3D R= ecord->Next) { - if (strcmp(Key, Record->Next->Key) =3D=3D 0) { + if (AsciiStrCmp(Key, Record->Next->Key) =3D=3D 0) { break; } } @@ -872,11 +813,11 @@ SetContextRecord ( } =20 Unicode2Ascii(AsciiKey, Key); - if (strlen(AsciiKey) + Size + 1 > MAX_RECORD_LEN) { + if (AsciiStrLen(AsciiKey) + Size + 1 > MAX_RECORD_LEN) { return EFI_INVALID_PARAMETER; } =20 - if (strchr(AsciiKey, '=3D') !=3D NULL) { + if (AsciiStrStr(AsciiKey, "=3D") !=3D NULL) { EFI_ENTS_DEBUG((EFI_ENTS_D_ERROR, L"The KEY of record can not contain = =3D")); return EFI_INVALID_PARAMETER; } diff --git a/TestFrameworkPkg/Library/EasLib/EntsDpath.c b/TestFrameworkPkg= /Library/EasLib/EntsDpath.c index 1b44d5b..6a8abae 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsDpath.c +++ b/TestFrameworkPkg/Library/EasLib/EntsDpath.c @@ -777,38 +777,38 @@ struct { UINT8 SubType; VOID (*Function) (ENTS_POOL_PRINT *, VOID *); } DevPathTable[] =3D { - HARDWARE_DEVICE_PATH, HW_PCI_DP, _DevPathPci, - HARDWARE_DEVICE_PATH, HW_PCCARD_DP, _DevPathPccard, - HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, _DevPathMemMap, - HARDWARE_DEVICE_PATH, HW_VENDOR_DP, _DevPathVendor, - HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, _DevPathContro= ller, - ACPI_DEVICE_PATH, ACPI_DP, _DevPathAcpi, - ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, _DevPathExtend= edAcpi, - ACPI_DEVICE_PATH, ACPI_ADR_DP, _DevPathAdrAcp= i, - MESSAGING_DEVICE_PATH, MSG_ATAPI_DP, _DevPathAtapi, - MESSAGING_DEVICE_PATH, MSG_SCSI_DP, _DevPathScsi, - MESSAGING_DEVICE_PATH, MSG_FIBRECHANNEL_DP, _DevPathFibre, - MESSAGING_DEVICE_PATH, MSG_1394_DP, _DevPath1394, - MESSAGING_DEVICE_PATH, MSG_USB_DP, _DevPathUsb, - MESSAGING_DEVICE_PATH, MSG_USB_CLASS_DP, _DevPathUsbCla= ss, - MESSAGING_DEVICE_PATH, MSG_I2O_DP, _DevPathI2O, - MESSAGING_DEVICE_PATH, MSG_MAC_ADDR_DP, _DevPathMacAdd= r, - MESSAGING_DEVICE_PATH, MSG_IPv4_DP, _DevPathIPv4, - MESSAGING_DEVICE_PATH, MSG_IPv6_DP, _DevPathIPv6, - MESSAGING_DEVICE_PATH, MSG_INFINIBAND_DP, _DevPathInfini= Band, - MESSAGING_DEVICE_PATH, MSG_UART_DP, _DevPathUart, - MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, _DevPathVendor, - MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, _DevPathHardDr= ive, - MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, _DevPathCDROM, - MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, _DevPathVendor, - MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, _DevPathFilePa= th, - MEDIA_DEVICE_PATH, MEDIA_PROTOCOL_DP, _DevPathMediaP= rotocol, + { HARDWARE_DEVICE_PATH, HW_PCI_DP, _DevPathPci}, + { HARDWARE_DEVICE_PATH, HW_PCCARD_DP, _DevPathPcca= rd}, + { HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, _DevPathMemM= ap}, + { HARDWARE_DEVICE_PATH, HW_VENDOR_DP, _DevPathVend= or}, + { HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, _DevPathCont= roller}, + { ACPI_DEVICE_PATH, ACPI_DP, _DevPathAcpi= }, + { ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, _DevPathExte= ndedAcpi}, + { ACPI_DEVICE_PATH, ACPI_ADR_DP, _DevPathAdrA= cpi}, + { MESSAGING_DEVICE_PATH, MSG_ATAPI_DP, _DevPathAtap= i}, + { MESSAGING_DEVICE_PATH, MSG_SCSI_DP, _DevPathScsi= }, + { MESSAGING_DEVICE_PATH, MSG_FIBRECHANNEL_DP, _DevPathFibr= e}, + { MESSAGING_DEVICE_PATH, MSG_1394_DP, _DevPath1394= }, + { MESSAGING_DEVICE_PATH, MSG_USB_DP, _DevPathUsb}, + { MESSAGING_DEVICE_PATH, MSG_USB_CLASS_DP, _DevPathUsbC= lass}, + { MESSAGING_DEVICE_PATH, MSG_I2O_DP, _DevPathI2O}, + { MESSAGING_DEVICE_PATH, MSG_MAC_ADDR_DP, _DevPathMacA= ddr}, + { MESSAGING_DEVICE_PATH, MSG_IPv4_DP, _DevPathIPv4= }, + { MESSAGING_DEVICE_PATH, MSG_IPv6_DP, _DevPathIPv6= }, + { MESSAGING_DEVICE_PATH, MSG_INFINIBAND_DP, _DevPathInfi= niBand}, + { MESSAGING_DEVICE_PATH, MSG_UART_DP, _DevPathUart= }, + { MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, _DevPathVend= or}, + { MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, _DevPathHard= Drive}, + { MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, _DevPathCDRO= M}, + { MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, _DevPathVend= or}, + { MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, _DevPathFile= Path}, + { MEDIA_DEVICE_PATH, MEDIA_PROTOCOL_DP, _DevPathMedi= aProtocol}, #if (EFI_SPECIFICATION_VERSION < 0x00020000) - MEDIA_DEVICE_PATH, MEDIA_FV_FILEPATH_DP, _DevPathFvFile= Path, + { MEDIA_DEVICE_PATH, MEDIA_FV_FILEPATH_DP, _DevPathFvFi= lePath}, #endif - BBS_DEVICE_PATH, BBS_BBS_DP, _DevPathBssBss, - END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, _DevPathEndIns= tance, - 0, 0, NULL + { BBS_DEVICE_PATH, BBS_BBS_DP, _DevPathBssB= ss}, + { END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, _DevPathEndI= nstance}, + { 0, 0, NULL} }; =20 UINTN diff --git a/TestFrameworkPkg/Library/EasLib/EntsGuid.c b/TestFrameworkPkg/= Library/EasLib/EntsGuid.c index 3e02e69..0bd8bc3 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsGuid.c +++ b/TestFrameworkPkg/Library/EasLib/EntsGuid.c @@ -17,27 +17,27 @@ =20 #define SHELL_INTERFACE_PROTOCOL \ { \ - 0x47c7b223, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0= x3b \ + 0x47c7b223, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, = 0x3b} \ } =20 #define ENVIRONMENT_VARIABLE_ID \ { \ - 0x47c7b224, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0= x3b \ + 0x47c7b224, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, = 0x3b} \ } =20 #define DEVICE_PATH_MAPPING_ID \ { \ - 0x47c7b225, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0= x3b \ + 0x47c7b225, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, = 0x3b} \ } =20 #define PROTOCOL_ID_ID \ { \ - 0x47c7b226, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0= x3b \ + 0x47c7b226, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, = 0x3b} \ } =20 #define ALIAS_ID \ { \ - 0x47c7b227, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0= x3b \ + 0x47c7b227, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, = 0x3b} \ } =20 static EFI_GUID ShellInterfaceProtocol =3D SHELL_INTERFACE_PROTOCOL; @@ -51,72 +51,43 @@ struct { CHAR16 *GuidName; } EntsKnownGuids[] =3D { - &tNullGuid, - L"G0", - &tEfiGlobalVariable, - L"Efi", - - >EfiDevicePathProtocolGuid, - L"dpath", - >EfiLoadedImageProtocolGuid, - L"image", - >EfiSimpleTextInProtocolGuid, - L"txtin", - >EfiSimpleTextOutProtocolGuid, - L"txtout", - >EfiBlockIoProtocolGuid, - L"blkio", - >EfiDiskIoProtocolGuid, - L"diskio", - >EfiSimpleFileSystemProtocolGuid, - L"fs", - >EfiLoadFileProtocolGuid, - L"load", - >EfiDeviceIoProtocolGuid, - L"DevIo", - - &tGenericFileInfo, - L"GenFileInfo", - >EfiFileSystemInfoGuid, - L"FileSysInfo", - - >EfiUnicodeCollationProtocolGuid, - L"UnicodeCollation", - >EfiSerialIoProtocolGuid, - L"serialio", - >EfiSimpleNetworkProtocolGuid, - L"net", - >EfiNetworkInterfaceIdentifierProtocolGuid, - L"nii", - >EfiPxeBaseCodeProtocolGuid, - L"pxebc", - >EfiPxeCallbackProtocolGuid, - L"pxecb", - - &tPcAnsiProtocol, - L"PcAnsi", - &tVt100Protocol, - L"Vt100", - >EfiUnknownDeviceGuid, - L"Unknown Device", - - >EfiPartTypeSystemPartitionGuid, - L"ESP", - >EfiPartTypeLegacyMbrGuid, - L"GPT MBR", - - &ShellInterfaceProtocol, - L"ShellInt", - &SEnvId, - L"SEnv", - &SProtId, - L"ShellProtId", - &SMapId, - L"ShellDevPathMap", - &SAliasId, - L"ShellAlias", - - NULL + { &tNullGuid, L"G0"}, + { &tEfiGlobalVariable, L"Efi"}, + + { >EfiDevicePathProtocolGuid, L"dpath"}, + { >EfiLoadedImageProtocolGuid, L"image"}, + { >EfiSimpleTextInProtocolGuid, L"txtin"}, + { >EfiSimpleTextOutProtocolGuid, L"txtout"}, + { >EfiBlockIoProtocolGuid, L"blkio"}, + { >EfiDiskIoProtocolGuid, L"diskio"}, + { >EfiSimpleFileSystemProtocolGuid, L"fs"}, + { >EfiLoadFileProtocolGuid, L"load"}, + { >EfiDeviceIoProtocolGuid, L"DevIo"}, + + { &tGenericFileInfo, L"GenFileInfo"}, + { >EfiFileSystemInfoGuid, L"FileSysInfo"}, + + { >EfiUnicodeCollationProtocolGuid, L"UnicodeCollation"}, + { >EfiSerialIoProtocolGuid, L"serialio"}, + { >EfiSimpleNetworkProtocolGuid, L"net"}, + { >EfiNetworkInterfaceIdentifierProtocolGuid, L"nii"}, + { >EfiPxeBaseCodeProtocolGuid, L"pxebc"}, + { >EfiPxeCallbackProtocolGuid, L"pxecb"}, + + { &tPcAnsiProtocol, L"PcAnsi"}, + { &tVt100Protocol, L"Vt100"}, + { >EfiUnknownDeviceGuid, L"Unknown Device"}, + + { >EfiPartTypeSystemPartitionGuid, L"ESP"}, + { >EfiPartTypeLegacyMbrGuid, L"GPT MBR"}, + + { &ShellInterfaceProtocol, L"ShellInt"}, + { &SEnvId, L"SEnv"}, + { &SProtId, L"ShellProtId"}, + { &SMapId, L"ShellDevPathMap"}, + { &SAliasId, L"ShellAlias"}, + + { NULL, NULL} }; =20 VOID diff --git a/TestFrameworkPkg/Library/EasLib/EntsLib.c b/TestFrameworkPkg/L= ibrary/EasLib/EntsLib.c index 38300c2..97603c9 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsLib.c +++ b/TestFrameworkPkg/Library/EasLib/EntsLib.c @@ -29,26 +29,13 @@ EFI_RUNTIME_SERVICES *gntRT =3D NULL; // EFI_MEMORY_TYPE EntsPoolAllocationType =3D EfiBootServices= Data; =20 -// -// Unicode collation functions that are in use -// -EFI_UNICODE_COLLATION_PROTOCOL EntsLibStubUnicodeInterface =3D { - EntsLibStubStriCmp, - EntsLibStubMetaiMatch, - EntsLibStubStrLwrUpr, - EntsLibStubStrLwrUpr, - NULL, // FatToStr - NULL, // StrToFat - NULL // SupportedLanguages -}; - -EFI_UNICODE_COLLATION_PROTOCOL *EntsUnicodeInterface =3D &EntsLibStubUnic= odeInterface; +EFI_UNICODE_COLLATION_PROTOCOL *EntsUnicodeInterface =3D NULL; =20 // // EFI IDs // EFI_GUID tEfiGlobalVariable =3D EFI_GLOBAL_VARIABL= E; -EFI_GUID tNullGuid =3D { 0, 0, 0, 0, 0, 0= , 0, 0, 0, 0, 0 }; +EFI_GUID tNullGuid =3D { 0, 0, 0, {0, 0, = 0, 0, 0, 0, 0, 0 }}; =20 // // Protocol IDs @@ -153,6 +140,10 @@ Returns: if (EFI_ERROR(Status)) { return Status; } + Status =3D gntBS->LocateProtocol(&gEfiUnicodeCollation2ProtocolGuid, N= ULL, (VOID**)&EntsUnicodeInterface); + if (EFI_ERROR(Status)) { + return Status; + } } =20 return EFI_SUCCESS; diff --git a/TestFrameworkPkg/Library/EasLib/EntsLib.inf b/TestFrameworkPkg= /Library/EasLib/EntsLib.inf index acdc0ad..d9f00ff 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsLib.inf +++ b/TestFrameworkPkg/Library/EasLib/EntsLib.inf @@ -83,3 +83,4 @@ gEfiManagedNetworkProtocolGuid gEfiManagedNetworkServiceBindingProtocolGuid gEfiSimpleNetworkProtocolGuid + gEfiUnicodeCollation2ProtocolGuid diff --git a/TestFrameworkPkg/Library/EasLib/EntsStr.c b/TestFrameworkPkg/L= ibrary/EasLib/EntsStr.c index 1ba83a7..ed2e268 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsStr.c +++ b/TestFrameworkPkg/Library/EasLib/EntsStr.c @@ -240,25 +240,6 @@ EntsStrDuplicate ( } =20 INTN -EntsLibStubStriCmp ( - IN EFI_UNICODE_COLLATION_PROTOCOL *This, - IN CHAR16 *s1, - IN CHAR16 *s2 - ) -{ - return StrCmp (s1, s2); -} - -VOID -EntsLibStubStrLwrUpr ( - IN EFI_UNICODE_COLLATION_PROTOCOL *This, - IN CHAR16 *Str - ) -{ - return; -} - -INTN EFIAPI StriCmp ( IN CHAR16 *s1, @@ -268,146 +249,6 @@ StriCmp ( return EntsUnicodeInterface->StriColl (EntsUnicodeInterface, s1, s2); } =20 -STATIC -BOOLEAN -MetaMatch ( - IN CHAR16 *String, - IN CHAR16 *Pattern - ) -{ - CHAR16 c; - - CHAR16 p; - - CHAR16 l; - - for (;;) { - p =3D *Pattern; - Pattern +=3D 1; - - switch (p) { - case 0: - // - // End of pattern. If end of string, TRUE match - // - return (BOOLEAN) (*String ? FALSE : TRUE); - - case '*': - // - // Match zero or more chars - // - while (*String) { - if (MetaMatch (String, Pattern)) { - return TRUE; - } - - String +=3D 1; - } - - return MetaMatch (String, Pattern); - - case '?': - // - // Match any one char - // - if (!*String) { - return FALSE; - } - - String +=3D 1; - break; - - case '[': - // - // Match char set - // - c =3D *String; - if (!c) { - return FALSE; - // - // syntax problem - // - } - - l =3D 0; - p =3D *Pattern++; - while (p) { - if (p =3D=3D ']') { - return FALSE; - } - - if (p =3D=3D '-') { - // - // if range of chars, - // - p =3D *Pattern; - // - // get high range - // - if (p =3D=3D 0 || p =3D=3D ']') { - return FALSE; - // - // syntax problem - // - } - - if (c >=3D l && c <=3D p) { - // - // if in range, - // - break; - // - // it's a match - // - } - } - - l =3D p; - if (c =3D=3D p) { - // - // if char matches - // - break; - // - // move on - // - } - - p =3D *Pattern++; - } - // - // skip to end of match char set - // - while (p && p !=3D ']') { - p =3D *Pattern; - Pattern +=3D 1; - } - - String +=3D 1; - break; - - default: - c =3D *String; - if (c !=3D p) { - return FALSE; - } - - String +=3D 1; - break; - } - } -} - -BOOLEAN -EntsLibStubMetaiMatch ( - IN EFI_UNICODE_COLLATION_PROTOCOL *This, - IN CHAR16 *String, - IN CHAR16 *Pattern - ) -{ - return MetaMatch (String, Pattern); -} - UINTN Atoi ( CHAR16 *str @@ -532,23 +373,6 @@ Returns: return EFI_SUCCESS; } =20 -CHAR16 * -EntsStrChr ( - IN CHAR16 *Str, - IN CHAR16 c - ) -{ - ASSERT (Str !=3D NULL); - - for (; *Str !=3D c; ++Str) { - if (*Str =3D=3D '\0') { - return NULL; - } - } - - return (CHAR16 *) Str; -} - UINTN EntsStrStr ( IN CHAR16 *Str, @@ -654,69 +478,6 @@ strtok_line ( } =20 CHAR16 * -strtok_arg ( - CHAR16 *s, - const CHAR16 *ct - ) -/*++ - -Routine Description: - - Find the next token in a string - Tokens are separated by separators defined in "ct" - If enclosed in double quotations, other separators are invalid. Then tok= en is - the content in the quotations. - ---*/ -{ - CHAR16 *sbegin; - - CHAR16 *send; - INT32 l; - - sbegin =3D s ? s : ___strtok_arg; - if (!sbegin) { - return NULL; - } - - sbegin +=3D strspn (sbegin, ct); - - // - // extract string enclosed in double quotation marks - // - if ((*sbegin =3D=3D '"') || (*sbegin =3D=3D 'L' && *(sbegin + 1) =3D=3D = '"')) { - l =3D (*sbegin =3D=3D 'L') ? 2 : 1; - sbegin +=3D l; - if (!sbegin) { - return NULL; - } - - send =3D strpbrk (sbegin, L"\""); - if (send && (*send !=3D '\0')) { - *send++ =3D '\0'; - } - - ___strtok_arg =3D send; - return sbegin - l; - } - // - // extract string separated per ct - // - if (*sbegin =3D=3D '\0') { - ___strtok_arg =3D NULL; - return NULL; - } - - send =3D strpbrk (sbegin, ct); - if (send && (*send !=3D '\0')) { - *send++ =3D '\0'; - } - - ___strtok_arg =3D send; - return sbegin; -} - -CHAR16 * strtok_field ( CHAR16 *s, const CHAR16 *ct @@ -819,44 +580,6 @@ Routine Description: return NULL; } =20 -EFI_STATUS -EntsStrToValue ( - IN CHAR16 *Buffer, - OUT UINTN *Value - ) -/*++ - -Routine Description: - - Convert a string to a value. - -Arguments: - - Buffer - String buffer. - Value - Pointer to receive the converted value. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -{ - if ((Buffer =3D=3D NULL) || (Value =3D=3D NULL)) { - return EFI_INVALID_PARAMETER; - } - // - // Convert a string to a value - // - if (Buffer[0] =3D=3D L'-') { - *Value =3D (UINTN) (0 - Atoi (Buffer + 1)); - } else { - *Value =3D Atoi (Buffer); - } - - return EFI_SUCCESS; -} - INTN EntsStrToUINTN ( IN CHAR16 *Str, @@ -922,229 +645,6 @@ EntsHexStrToUINTN ( return Index; } =20 -EFI_STATUS -EntsHexValueToStr ( - IN UINTN Value, - OUT CHAR16 *Buffer - ) -/*++ - -Routine Description: - - Convert a hexadecimal value to a string. - -Arguments: - - Value - Value to be converted. - Buffer - Pointer to string receive buffer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -{ - if (Buffer =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - // - // Convert a value to a string - // - EntsSPrint (Buffer, 0, L"0x%x", Value); - - return EFI_SUCCESS; -} - -EFI_STATUS -EntsStrToHexValue ( - IN CHAR16 *Buffer, - OUT UINTN *Value - ) -/*++ - -Routine Description: - - Convert a string to a hexadecimal value. - -Arguments: - - Buffer - String buffer to be converted. - Value - Receive value pointer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -{ - CHAR16 c; - - if ((Buffer =3D=3D NULL) || (Value =3D=3D NULL)) { - return EFI_INVALID_PARAMETER; - } - // - // skip preceeding white space - // - while (*Buffer && *Buffer =3D=3D ' ') { - Buffer +=3D 1; - } - // - // skip preceeding zeros - // - while (*Buffer && *Buffer =3D=3D '0') { - Buffer +=3D 1; - } - // - // skip preceeding white space - // - if (*Buffer && (*Buffer =3D=3D 'x' || *Buffer =3D=3D 'X')) { - Buffer +=3D 1; - } - - *Value =3D 0; - c =3D *(Buffer++); - while (c) { - if (c >=3D 'a' && c <=3D 'f') { - c -=3D 'a' - 'A'; - } - - if ((c >=3D '0' && c <=3D '9') || (c >=3D 'A' && c <=3D 'F')) { - *Value =3D *Value << 4 | c - (c >=3D 'A' ? 'A' - 10 : '0'); - } else { - break; - } - - c =3D *(Buffer++); - } - - return EFI_SUCCESS; -} - -EFI_STATUS -EntsBooleanToStr ( - IN BOOLEAN Value, - OUT CHAR16 *Buffer - ) -/*++ - -Routine Description: - - Convert a boolean to a string. - -Arguments: - - Value - Boolean value. - Buffer - Receive string buffer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_SUCCESS - Operation succeeded. - ---*/ -{ - if (Buffer =3D=3D NULL) { - return EFI_INVALID_PARAMETER; - } - // - // Convert a boolean to a string - // - if (Value) { - StrCpy (Buffer, L"True"); - } else { - StrCpy (Buffer, L"False"); - } - - return EFI_SUCCESS; -} - -EFI_STATUS -EntsStrToBoolean ( - IN CHAR16 *Buffer, - OUT BOOLEAN *Value - ) -/*++ - -Routine Description: - - Convert a string to a boolean. - -Arguments: - - Buffer - String buffer to be converted. - Value - Receive value pointer. - -Returns: - - EFI_INVALID_PARAMETER - Parameter invalid. - EFI_UNSUPPORTED - String not supported. - EFI_SUCCESS - Operation succeeded. - ---*/ -{ - if ((Buffer =3D=3D NULL) || (Value =3D=3D NULL)) { - return EFI_INVALID_PARAMETER; - } - - if (StriCmp (Buffer, L"True") =3D=3D 0) { - *Value =3D TRUE; - } else if (StriCmp (Buffer, L"False") =3D=3D 0) { - *Value =3D FALSE; - } else { - return EFI_UNSUPPORTED; - } - - return EFI_SUCCESS; -} - -BOOLEAN -EntStrBeginWith ( - IN CHAR16 *Str, - IN CHAR16 *SubStr - ) -/*++ - -Routine Description: - - Test if the string is begin with the sub string. - -Arguments: - - Str - The pointer to the string being tested - SubStr - The pointer to the sub string - -Returns: - - TRUE - The Str is begin with SubStr. - FALSE - The Str not begin with SubStr. - ---*/ -{ - CHAR16 *Temp; - - if ((Str =3D=3D NULL) || (SubStr =3D=3D NULL) || (StrLen (Str) < StrLen = (SubStr))) { - return FALSE; - } - // - // Remove the pre-space characters - // - Temp =3D SubStr; - - while (*Temp =3D=3D L' ') { - Temp =3D Temp + 1; - } - // - // Compare - // - if (StrnCmp (Str, Temp, StrLen (Temp)) =3D=3D 0) { - return TRUE; - } else { - return FALSE; - } -} - BOOLEAN EntsStrEndWith ( IN CHAR16 *Str, @@ -1222,48 +722,6 @@ Returns: return EFI_SUCCESS; } =20 -UINTN -HexStringToValue ( - IN CHAR16 *String, - IN UINTN Length - ) -/*++ - -Routine Description: - - Convert a hex string to a value. - -Arguments: - - String - Hex string buffer. - Length - Hex string length. - -Returns: - - Converted value. - ---*/ -{ - UINTN Index; - UINTN Value; - - Value =3D 0; - - for (Index =3D 0; Index < Length; Index++) { - if ((String[Index] >=3D L'0') && (String[Index] <=3D L'9')) { - Value =3D (Value << 4) + (String[Index] - L'0'); - } else if ((String[Index] >=3D L'A') && (String[Index] <=3D L'F')) { - Value =3D (Value << 4) + (String[Index] - L'A' + 10); - } else if ((String[Index] >=3D L'a') && (String[Index] <=3D L'f')) { - Value =3D (Value << 4) + (String[Index] - L'a' + 10); - } else { - return 0; - } - } - - return Value; -} - INTN a2i ( IN CHAR16 Ch @@ -1284,154 +742,6 @@ a2i ( return -1; } =20 -CHAR16 -i2A ( - UINTN x - ) -{ - if (x >=3D 0 && x <=3D 9) { - return (CHAR16) (x + '0'); - } - - if (x >=3D 10 && x <=3D 15) { - return (CHAR16) (x - 10 + 'A'); - } - - return 0; -} - -CHAR16 -i2a ( - UINTN x - ) -{ - if (x >=3D 0 && x <=3D 9) { - return (CHAR16) (x + '0'); - } - - if (x >=3D 10 && x <=3D 15) { - return (CHAR16) (x - 10 + 'a'); - } - - return 0; -} - -EFI_STATUS -EntsStrToIp ( - IN CHAR16 *Str, - IN OUT EFI_IP_ADDRESS *IpAddr - ) -{ - UINT8 i; - INTN templen; - CHAR16 *s; - UINTN temp; - - templen =3D 0; - s =3D Str; - temp =3D 0; - - SetMem (IpAddr, sizeof (EFI_IP_ADDRESS), 0); - for (i =3D 0; i < 4; i++) { - templen =3D EntsStrToUINTN (s, &temp); - if ((templen < 0) || (temp > 255)) { - return EFI_INVALID_PARAMETER; - } - - IpAddr->v4.Addr[i] =3D (UINT8) temp; - if (i =3D=3D 3) { - break; - } - - if (s[templen] !=3D L'.') { - return EFI_INVALID_PARAMETER; - } - - s =3D &s[templen + 1]; - } - - return EFI_SUCCESS; -} - -EFI_STATUS -EntsIpToStr ( - IN EFI_IP_ADDRESS *IpAddr, - IN UINTN StrSize, - OUT CHAR16 *Str - ) -{ - EntsSPrint ( - Str, - StrSize, - L"%d.%d.%d.%d", - IpAddr->v4.Addr[0], - IpAddr->v4.Addr[1], - IpAddr->v4.Addr[2], - IpAddr->v4.Addr[3] - ); - - return EFI_SUCCESS; -} - -EFI_STATUS -EntsStrToMac ( - IN CHAR16 *Str, - IN OUT EFI_MAC_ADDRESS *MacAddr - ) -{ - UINT8 i; - INTN templen; - CHAR16 *s; - UINTN temp; - - templen =3D 0; - s =3D Str; - temp =3D 0; - - SetMem (MacAddr, sizeof (EFI_MAC_ADDRESS), 0); - for (i =3D 0; i < 6; i++) { - templen =3D EntsHexStrToUINTN (s, &temp); - if ((templen < 0) || (temp > 255)) { - return EFI_INVALID_PARAMETER; - } - - MacAddr->Addr[i] =3D (UINT8) temp; - if (i =3D=3D 5) { - break; - } - - if (s[templen] !=3D L':') { - return EFI_INVALID_PARAMETER; - } - - s =3D &s[templen + 1]; - } - - return EFI_SUCCESS; -} - -EFI_STATUS -EntsMacToStr ( - IN OUT EFI_MAC_ADDRESS *MacAddr, - IN UINTN StrSize, - OUT CHAR16 *Str - ) -{ - EntsSPrint ( - Str, - StrSize, - L"%02x:%02x:%02x:%02x:%02x:%02x", - MacAddr->Addr[0], - MacAddr->Addr[1], - MacAddr->Addr[2], - MacAddr->Addr[3], - MacAddr->Addr[4], - MacAddr->Addr[5] - ); - - return EFI_SUCCESS; -} - EFI_STATUS EntsTimeToStr ( IN EFI_TIME *Time, diff --git a/TestFrameworkPkg/Library/EasLib/EntsSupport.c b/TestFrameworkP= kg/Library/EasLib/EntsSupport.c index 6cacd3b..efd2c87 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsSupport.c +++ b/TestFrameworkPkg/Library/EasLib/EntsSupport.c @@ -49,21 +49,20 @@ UINTN NICDevicePathLen = =3D 0; CHAR16 NICDevicePathStr[MAX_DEVICE_PATH_STR_LEN] = =3D {0, }; =20 #define SCT_AGENT_NIC_DEVICE_PATH L"Sct Agent NIC Device Path" -EFI_GUID gSctVendorGuid =3D {0x72092b90, 0x17da, 0x47d1, 0x95, 0xce, 0x88,= 0xf0, 0x12, 0xe8, 0x50, 0x8d}; +EFI_GUID gSctVendorGuid =3D {0x72092b90, 0x17da, 0x47d1, {0x95, 0xce, 0x88= , 0xf0, 0x12, 0xe8, 0x50, 0x8d}}; =20 #define MAX_PACKET_LENGTH 1492 =20 STATIC EFI_MANAGED_NETWORK_TRANSMIT_DATA EntsMnpTxDataTemplate =3D { &NetAssertionConfigData.ServerMac, // DestinationAddress &NetAssertionConfigData.MacAddr, // SourceAddress - 0x0800, // ProtocolType + 0x0800, // ProtocolType 0, // DataLength 0, // HeaderLength 1, // FragmentCount - { - 0, - NULL - } // FragmentTable + { // FragmentTable + {0, NULL} + } }; =20 #define ENTS_SERVER_MAC_ADDRESS_NAME L"ServerMac" diff --git a/TestFrameworkPkg/Library/EasLib/EntsTime.c b/TestFrameworkPkg/= Library/EasLib/EntsTime.c index 2565443..c93e51c 100644 --- a/TestFrameworkPkg/Library/EasLib/EntsTime.c +++ b/TestFrameworkPkg/Library/EasLib/EntsTime.c @@ -18,7 +18,7 @@ // // Global variables and definitions // -#define IS_LEAP(y) (((y) % 4) =3D=3D 0 && ((y) % 100) !=3D 0 || ((y) % 40= 0) =3D=3D 0) +#define IS_LEAP(y) ((((y) % 4) =3D=3D 0 && ((y) % 100) !=3D 0) || ((y) % = 400) =3D=3D 0) =20 static const UINTN MonthLengths[2][12] =3D { { diff --git a/TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c b/TestFramewo= rkPkg/Library/EfiTestLib/EfiTestLib.c index ac9912b..20d2dec 100644 --- a/TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c +++ b/TestFrameworkPkg/Library/EfiTestLib/EfiTestLib.c @@ -87,6 +87,7 @@ CompareGuid ( ); =20 BOOLEAN +EFIAPI CheckBBTestCanRunAndRecordAssertion ( IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib, IN CHAR16 *AssertionString, @@ -870,6 +871,7 @@ CompareGuid ( #if (EFI_SPECIFICATION_VERSION >=3D 0x00020000) =20 BOOLEAN +EFIAPI CheckBBTestCanRunAndRecordAssertion ( IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib, IN CHAR16 *AssertionString, @@ -895,6 +897,7 @@ CheckBBTestCanRunAndRecordAssertion ( #else =20 BOOLEAN +EFIAPI CheckBBTestCanRunAndRecordAssertion ( IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib, IN CHAR16 *AssertionString, @@ -908,6 +911,7 @@ CheckBBTestCanRunAndRecordAssertion ( #endif =20 EFI_STATUS +EFIAPI EfiTestLibGetSystemConfigurationTable ( IN EFI_GUID *TableGuid, IN OUT VOID **Table diff --git a/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkM= onitor.c b/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMon= itor.c index a4775a2..40c6740 100644 --- a/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.c +++ b/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.c @@ -65,15 +65,15 @@ STATIC LINK_LAYER_STATUS LinkStatus =3D= WaitForPacket; =20 #define DESTINATION_ADDRESS \ { \ - 255, 255, 255, 255 \ + {255, 255, 255, 255} \ } #define STATION_ADDRESS \ { \ - 0, 0, 0, 0 \ + {0, 0, 0, 0} \ } #define SUBNET_MASK \ { \ - 0, 0, 0, 0 \ + {0, 0, 0, 0} \ } =20 EFI_IP4_CONFIG_DATA mIp4ConfigDataTemplate =3D { @@ -104,8 +104,7 @@ EFI_IP4_TRANSMIT_DATA mIp4TxDataTemplate =3D { 0, // TotalDataLength 1, // FragmentCount { - 0, - NULL + {0, NULL} } // FragmentTable }; =20 @@ -121,8 +120,7 @@ EFI_IP4_RECEIVE_DATA mIp4RxDataTemplate =3D { 0, // DataLength 1, // FragmentCount { - 0, - NULL + {0, NULL} } // FragmentTable }; =20 @@ -141,12 +139,14 @@ StartInitIp4 ( ); =20 VOID +EFIAPI NotifyFunctionSend ( EFI_EVENT Event, VOID *Context ); =20 VOID +EFIAPI NotifyFunctionListen ( EFI_EVENT Event, VOID *Context @@ -173,6 +173,7 @@ SetResendTimer ( ); =20 VOID +EFIAPI ReSendTimer ( IN EFI_EVENT Event, IN VOID *Context @@ -263,6 +264,7 @@ Error: } =20 EFI_STATUS +EFIAPI IP4NetworkMonitorUnload ( IN EFI_HANDLE ImageHandle ) @@ -303,6 +305,7 @@ Returns: // External functions implementations // EFI_STATUS +EFIAPI InitIP4Network ( IN EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -411,6 +414,7 @@ Returns: } =20 EFI_STATUS +EFIAPI ResetIP4Network ( IN EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -565,6 +569,7 @@ Returns: } =20 EFI_STATUS +EFIAPI IP4NetworkSaveContext( EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -588,6 +593,7 @@ IP4NetworkSaveContext( } =20 EFI_STATUS +EFIAPI IP4NetworkRestoreContext( IN EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -614,6 +620,7 @@ IP4NetworkRestoreContext( } =20 EFI_STATUS +EFIAPI IP4NetworkListener ( IN EFI_ENTS_MONITOR_PROTOCOL *This, IN OUT UINTN *Size, @@ -673,6 +680,7 @@ Returns: } =20 EFI_STATUS +EFIAPI IP4NetworkSender ( IN EFI_ENTS_MONITOR_PROTOCOL *This, IN CHAR16 *Buffer @@ -890,6 +898,7 @@ Returns: } =20 VOID +EFIAPI NotifyFunctionSend ( EFI_EVENT Event, VOID *Context @@ -915,6 +924,7 @@ Returns: } =20 VOID +EFIAPI NotifyFunctionListen ( EFI_EVENT Event, VOID *Context @@ -936,7 +946,6 @@ Returns: --*/ { EAS_IP4_FRAG_FLAG FragFlag; - EFI_STATUS Status; UINT32 SequenceID; UINTN Index; =20 @@ -944,7 +953,7 @@ Returns: // Timeout occur, continue // if (RxToken.Status =3D=3D EFI_TIMEOUT) { - Status =3D Ip4->Receive (Ip4, &RxToken); + Ip4->Receive (Ip4, &RxToken); return ; } =20 @@ -1093,12 +1102,13 @@ Returns: break; } =20 - Status =3D Ip4->Receive (Ip4, &RxToken); + Ip4->Receive (Ip4, &RxToken); =20 return ; } =20 VOID +EFIAPI ReSendTimer ( IN EFI_EVENT Event, IN VOID *Context diff --git a/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkM= onitor.h b/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMon= itor.h index 5885a8d..256d2b2 100644 --- a/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.h +++ b/TestFrameworkPkg/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.h @@ -20,7 +20,7 @@ =20 #define ENTS_VENDOR_GUID \ { \ - 0x868b4f16, 0xc83a, 0x4205, 0xa9, 0x3c, 0x3f, 0x51, 0xcf, 0x7f, 0x61, = 0xc0 \ + 0x868b4f16, 0xc83a, 0x4205, {0xa9, 0x3c, 0x3f, 0x51, 0xcf, 0x7f, 0x61,= 0xc0} \ } =20 #define ENTS_SERVER_IPV4_ADDRESS_NAME L"ServerIp" @@ -56,6 +56,7 @@ typedef enum { } LINK_LAYER_STATUS; =20 EFI_STATUS +EFIAPI IP4NetworkSaveContext( EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -79,6 +80,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI IP4NetworkRestoreContext( IN EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -105,6 +107,7 @@ Returns: // External functions declarations // EFI_STATUS +EFIAPI IP4NetworkListener ( IN EFI_ENTS_MONITOR_PROTOCOL *This, IN OUT UINTN *Size, @@ -131,6 +134,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI IP4NetworkSender ( IN EFI_ENTS_MONITOR_PROTOCOL *This, IN CHAR16 *Buffer @@ -157,6 +161,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI InitIP4Network ( IN EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -179,6 +184,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI ResetIP4Network ( IN EFI_ENTS_MONITOR_PROTOCOL *This ) diff --git a/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/Managed= NetworkMonitor.c b/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/M= anagedNetworkMonitor.c index 8d2a8c2..d1e1a69 100644 --- a/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/ManagedNetwork= Monitor.c +++ b/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/ManagedNetwork= Monitor.c @@ -68,8 +68,8 @@ STATIC UINT32 mCurrentOpCod= e; STATIC UINT32 mCurrentSeqId; STATIC UINT32 mCurrentPacketLength; =20 -EFI_MAC_ADDRESS mDestinationAddress =3D { = 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -EFI_MAC_ADDRESS mSourceAddress =3D { = 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +EFI_MAC_ADDRESS mDestinationAddress =3D { = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff} }; +EFI_MAC_ADDRESS mSourceAddress =3D { = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff} }; =20 EFI_MANAGED_NETWORK_CONFIG_DATA mMnpConfigDataTemplate =3D { // @@ -95,8 +95,7 @@ EFI_MANAGED_NETWORK_TRANSMIT_DATA mMnpTxDataTem= plate =3D { 0, // HeaderLength 1, // FragmentCount { - 0, - NULL + {0,NULL} } // FragmentTable }; =20 @@ -142,12 +141,14 @@ MnpSendPacketOut ( ); =20 VOID +EFIAPI NotifyFunctionSend ( EFI_EVENT Event, VOID *Context ); =20 VOID +EFIAPI NotifyFunctionListen ( EFI_EVENT Event, VOID *Context @@ -180,12 +181,14 @@ SetResendTimer ( ); =20 VOID +EFIAPI ReSendTimer ( IN EFI_EVENT Event, IN VOID *Context ); =20 EFI_STATUS +EFIAPI ManagedNetworkMonitorUnload ( IN EFI_HANDLE ImageHandle ); @@ -755,9 +758,6 @@ Returns: --*/ { EFI_STATUS Status; - EFI_MANAGED_NETWORK_PROTOCOL *Mnp; - - Mnp =3D This->MonitorIo; =20 EntsPrint (L"MNP Send ...\n"); if (LinkStatus =3D=3D SendoutPacket) { @@ -858,7 +858,8 @@ Returns: // if (BufferSize <=3D MAX_PACKET_LENGTH) { IsOver =3D TRUE; - CLR_FLAG_MF (FragFlag.LLFlag); +// CLR_FLAG_MF (FragFlag.LLFlag); + FragFlag.Flag.MF =3D 0; PacketLength =3D (UINT32) BufferSize; FragFlag.Flag.Offset =3D HTONS ((UINT16)PacketStartPoint); } else { @@ -866,7 +867,8 @@ Returns: // Need more fragement // IsOver =3D FALSE; - SET_FLAG_MF (FragFlag.LLFlag); +// SET_FLAG_MF (FragFlag.LLFlag); + FragFlag.Flag.MF =3D 1; PacketLength =3D MAX_PACKET_LENGTH; FragFlag.Flag.Offset =3D HTONS ((UINT16)PacketStartPoint); BufferSize -=3D MAX_PACKET_LENGTH; @@ -1121,6 +1123,7 @@ ManagedNetworkRefresh( } =20 VOID +EFIAPI NotifyFunctionListen ( EFI_EVENT Event, VOID *Context @@ -1184,7 +1187,8 @@ Returns: SequenceId =3D NTOHL (FragFlag.Flag.SeqId); PacketStartPoint =3D NTOHS ((UINT16)(FragFlag.Flag.Offset)); PacketLength =3D RxData->DataLength - sizeof (EAS_MNP_FRAG_FLAG); - IsOver =3D HAS_FLAG_MF (FragFlag.LLFlag) ? FALSE : TRUE; +// IsOver =3D HAS_FLAG_MF (FragFlag.LLFlag) ? FALSE : TRUE; + IsOver =3D FragFlag.Flag.MF ? FALSE : TRUE; OpCode =3D FragFlag.Flag.OpCode; =20 // @@ -1399,6 +1403,7 @@ RESTART_RECEIVE: } =20 VOID +EFIAPI ReSendTimer ( IN EFI_EVENT Event, IN VOID *Context diff --git a/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/Managed= NetworkMonitor.h b/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/M= anagedNetworkMonitor.h index f7db299..f9ac4ad 100644 --- a/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/ManagedNetwork= Monitor.h +++ b/TestFrameworkPkg/MonitorServices/ManagedNetworkMonitor/ManagedNetwork= Monitor.h @@ -75,6 +75,7 @@ typedef enum { #define MAX_PACKET_LENGTH 1492 =20 EFI_STATUS +EFIAPI ManagedNetworkSaveContext ( IN EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -98,6 +99,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI ManagedNetworkRestoreContext( IN EFI_ENTS_MONITOR_PROTOCOL *This ) @@ -124,6 +126,7 @@ Returns: // External functions declarations // EFI_STATUS +EFIAPI ManagedNetworkListener ( IN EFI_ENTS_MONITOR_PROTOCOL *This, IN OUT UINTN *Size, @@ -150,6 +153,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI ManagedNetworkSender ( IN EFI_ENTS_MONITOR_PROTOCOL *This, IN CHAR16 *Buffer @@ -175,6 +179,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI InitManagedNetwork ( IN EFI_ENTS_MONITOR_PROTOCOL *This ) /*++ @@ -196,6 +201,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI ResetManagedNetwork ( IN EFI_ENTS_MONITOR_PROTOCOL *This ) /*++ diff --git a/TestFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c b/Tes= tFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c index e86a790..6389f7a 100644 --- a/TestFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c +++ b/TestFrameworkPkg/PeiSctManageModule/PeiSctManageModule.c @@ -621,7 +621,6 @@ BurnFd ( CHAR16* FdPath ) { - EFI_STATUS Status; EFI_STATUS ExecuteStatus; VOID* CmdLine =3D NULL; SHELL_FILE_HANDLE BurnHandle =3D NULL; @@ -649,13 +648,13 @@ BurnFd ( Print (L"\n\n"); Print (L"Burning %s\n\n", FdPath); =20 - Status =3D ShellExecute ( - &ImageHandle, - CmdLine, - FALSE, - NULL, - &ExecuteStatus - ); + ShellExecute ( + &ImageHandle, + CmdLine, + FALSE, + NULL, + &ExecuteStatus + ); =20 FreePool (CmdLine); =20 diff --git a/TestFrameworkPkg/Sct/Core/SctInit.c b/TestFrameworkPkg/Sct/Cor= e/SctInit.c index 6e27eae..f29cd38 100644 --- a/TestFrameworkPkg/Sct/Core/SctInit.c +++ b/TestFrameworkPkg/Sct/Core/SctInit.c @@ -43,7 +43,6 @@ Returns: { EFI_STATUS Status; EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters; - UINTN Argc; CHAR16 **Argv; =20 // @@ -61,7 +60,6 @@ Returns: return Status; } =20 - Argc =3D ShellParameters->Argc; Argv =3D ShellParameters->Argv; =20 gBS->CloseProtocol( diff --git a/TestFrameworkPkg/Sct/Data/TestCaseEx.c b/TestFrameworkPkg/Sct/= Data/TestCaseEx.c index 4e49a52..d85c88f 100644 --- a/TestFrameworkPkg/Sct/Data/TestCaseEx.c +++ b/TestFrameworkPkg/Sct/Data/TestCaseEx.c @@ -149,7 +149,6 @@ Returns: =20 --*/ { - UINT32 Order; LIST_ENTRY *Link; EFI_SCT_TEST_CASE *TestCase; EFI_SCT_TEST_CASE *Target; @@ -164,7 +163,6 @@ Returns: // // Initialize // - Order =3D EFI_SCT_TEST_CASE_INVALID; Target =3D NULL; =20 // diff --git a/TestFrameworkPkg/Sct/Data/TestNode.c b/TestFrameworkPkg/Sct/Da= ta/TestNode.c index 30df071..bf98966 100644 --- a/TestFrameworkPkg/Sct/Data/TestNode.c +++ b/TestFrameworkPkg/Sct/Data/TestNode.c @@ -119,7 +119,6 @@ Returns: --*/ { EFI_STATUS Status; - LIST_ENTRY *CategoryList; LIST_ENTRY *TestFileList; LIST_ENTRY *Link; EFI_SCT_CATEGORY_DATA *Category; @@ -145,7 +144,6 @@ Returns: // // Walk through all test files // - CategoryList =3D &gFT->CategoryList; TestFileList =3D &gFT->TestFileList; =20 for (Link =3D TestFileList->ForwardLink; Link !=3D TestFileList; Link = =3D Link->ForwardLink) { diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Core/Eas.c b/TestFrame= workPkg/Sct/ENTS/EasDispatcher/Core/Eas.c index 96fb40a..3d64180 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Core/Eas.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Core/Eas.c @@ -137,7 +137,6 @@ Returns: { EFI_STATUS Status; CHAR16 *Buffer; - CHAR16 *Arg; UINTN BufferSize; EFI_ENTS_MONITOR_PROTOCOL *EntsMonitor; =20 @@ -146,7 +145,6 @@ Returns: BufferSize =3D 0; Buffer =3D NULL; Status =3D EFI_SUCCESS; - Arg =3D NULL; EntsMonitor =3D gEasFT->Monitor; =20 Status =3D PostSctAgentDelayedCmd(); @@ -413,4 +411,3 @@ EmptyDelayedPostCmd ( Cmd->ComdInterface =3D NULL; } } - diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c b/Te= stFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c index cbb49dc..a278407 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Exec/EasCmdDisp.c @@ -1070,7 +1070,6 @@ Returns: EFI_ENTS_PROTOCOL *EntsProtocol; ENTS_INTERFACE *EntsInterface; EFI_STATUS Status; - EFI_STATUS TestStatus; RIVL_VARIABLE *DelayTimeVariable; UINT64 StartTick; UINT64 StopTick; @@ -1111,7 +1110,7 @@ Returns: // Call the entry point // StartTick =3D AsmReadTsc (); - TestStatus =3D EntsInterface->EntsInterfaceEntry (EntsProtocol->ClientI= nterface); + EntsInterface->EntsInterfaceEntry (EntsProtocol->ClientInterface); StopTick =3D AsmReadTsc (); RecordExecTime (StartTick, StopTick); =20 diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlType.c b/Test= FrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlType.c index 2d0bb28..d3ba7d4 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlType.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlType.c @@ -80,7 +80,10 @@ RIVL_INTERNAL_TYPE gRivlInternalTypeArray[] =3D { L"POINTER", sizeof (VOID *) }, - 0 + { + L"", + 0 + } }; =20 // @@ -257,14 +260,13 @@ Returns: =20 --*/ { - EFI_STATUS Status; CHAR16 *Name; =20 // // If buf is NULL, delete all type // if (TypeBuf =3D=3D NULL) { - Status =3D DelRivlAllType (); + DelRivlAllType (); return EFI_SUCCESS; } // diff --git a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c b/= TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c index efb7289..8d74dad 100644 --- a/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c +++ b/TestFrameworkPkg/Sct/ENTS/EasDispatcher/Rivl/RivlVariable.c @@ -162,14 +162,13 @@ Returns: =20 --*/ { - EFI_STATUS Status; CHAR16 *Name; =20 // // If buf is NULL, delete all variable // if (VarBuf =3D=3D NULL) { - Status =3D DelRivlAllVariable (); + DelRivlAllVariable (); return EFI_SUCCESS; } // @@ -1132,7 +1131,6 @@ Returns: RIVL_INTERNAL_TYPE *RivlInternalType; RIVL_MEMBER *RivlMember; CHAR16 *UnitName; - CHAR16 *ValueName; CHAR16 *IndexName; BOOLEAN HasIndex; UINTN IndexValue; @@ -1153,7 +1151,6 @@ Returns: } =20 UnitName =3D NULL; - ValueName =3D NULL; IndexName =3D NULL; HasIndex =3D FALSE; IndexValue =3D 0; @@ -1233,7 +1230,7 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - ValueName =3D my_strtok_field (UnitName, L"("); + my_strtok_field (UnitName, L"("); IndexName =3D my_strtok_field (NULL, L")"); =20 if (IndexName =3D=3D NULL) { @@ -1344,7 +1341,7 @@ Returns: // Recursive search the member name // while (UnitName !=3D NULL) { - ValueName =3D my_strtok_field (UnitName, L"("); + my_strtok_field (UnitName, L"("); IndexName =3D my_strtok_field (NULL, L")"); =20 if (IndexName =3D=3D NULL) { diff --git a/TestFrameworkPkg/Sct/Execute/Execute.c b/TestFrameworkPkg/Sct/= Execute/Execute.c index a55586d..c76ba0b 100644 --- a/TestFrameworkPkg/Sct/Execute/Execute.c +++ b/TestFrameworkPkg/Sct/Execute/Execute.c @@ -1161,7 +1161,6 @@ Routine Description: --*/ { EFI_STATUS Status; - EFI_AP_TEST_INTERFACE *ApTest; =20 // // Check parameters @@ -1173,8 +1172,6 @@ Routine Description: // // Application test interface // - ApTest =3D (EFI_AP_TEST_INTERFACE *) ExecuteInfo->TestProtocol; - while (ExecuteInfo->Iteration < ExecuteInfo->TestCase->Iterations) { // // Application test @@ -1453,7 +1450,6 @@ Routine Description: EFI_STATUS TestStatus; BOOLEAN IsSkip; CHAR16 *CmdLine; - EFI_AP_TEST_INTERFACE *ApTest; EFI_AP_TEST_ENTRY *ApEntry; =20 // @@ -1466,7 +1462,6 @@ Routine Description: // // Application test instance // - ApTest =3D (EFI_AP_TEST_INTERFACE *) ExecuteInfo->TestProtocol; ApEntry =3D (EFI_AP_TEST_ENTRY *) ExecuteInfo->TestEntry; =20 TestStatus =3D EFI_UNSUPPORTED; diff --git a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c b/TestFrameworkP= kg/Sct/Execute/ExecuteSupport.c index 8036050..ecd4112 100644 --- a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c +++ b/TestFrameworkPkg/Sct/Execute/ExecuteSupport.c @@ -928,6 +928,7 @@ GatherConfigHandles ( } =20 BOOLEAN +EFIAPI IhvInterfaceFilter ( IN VOID *ClientInterface, IN EFI_HANDLE SupportHandle, diff --git a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.h b/TestFrameworkP= kg/Sct/Execute/ExecuteSupport.h index 680eb2b..a98bac2 100644 --- a/TestFrameworkPkg/Sct/Execute/ExecuteSupport.h +++ b/TestFrameworkPkg/Sct/Execute/ExecuteSupport.h @@ -80,6 +80,7 @@ BOOLEAN ); =20 BOOLEAN +EFIAPI IhvInterfaceFilter ( IN VOID *ClientInterface, IN EFI_HANDLE SupportHandle, diff --git a/TestFrameworkPkg/Sct/Include/SctCore.h b/TestFrameworkPkg/Sct/= Include/SctCore.h index 36c2361..861cc0b 100644 --- a/TestFrameworkPkg/Sct/Include/SctCore.h +++ b/TestFrameworkPkg/Sct/Include/SctCore.h @@ -20,6 +20,7 @@ // =20 EFI_STATUS +EFIAPI InitializeSct ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable diff --git a/TestFrameworkPkg/Sct/Include/SctDef.h b/TestFrameworkPkg/Sct/I= nclude/SctDef.h index d0c4226..2d04ca9 100644 --- a/TestFrameworkPkg/Sct/Include/SctDef.h +++ b/TestFrameworkPkg/Sct/Include/SctDef.h @@ -65,7 +65,7 @@ // System hang assertion // #define EFI_SYSTEM_HANG_ASSERTION_GUID \ - { 0xde687a18, 0x0bbd, 0x4396, 0x85, 0x09, 0x49, 0x8f, 0xf2, 0x32, 0x34, = 0xf1 } + { 0xde687a18, 0x0bbd, 0x4396, {0x85, 0x09, 0x49, 0x8f, 0xf2, 0x32, 0x34,= 0xf1 }} =20 // // Global variables diff --git a/TestFrameworkPkg/Sct/Misc/SctMisc.c b/TestFrameworkPkg/Sct/Mis= c/SctMisc.c index 1108f63..73f63f5 100644 --- a/TestFrameworkPkg/Sct/Misc/SctMisc.c +++ b/TestFrameworkPkg/Sct/Misc/SctMisc.c @@ -1400,7 +1400,7 @@ Routine Description: StrCpy (Buffer, L"Exhaustive"); break; default: - EFI_UNSUPPORTED; + return EFI_UNSUPPORTED; } =20 return EFI_SUCCESS; diff --git a/TestFrameworkPkg/Sct/UI/BuildMenu.c b/TestFrameworkPkg/Sct/UI/= BuildMenu.c index 5d77dd5..dfa3d6c 100644 --- a/TestFrameworkPkg/Sct/UI/BuildMenu.c +++ b/TestFrameworkPkg/Sct/UI/BuildMenu.c @@ -40,6 +40,7 @@ CreateStandardMenuPage ( ); =20 EFI_STATUS +EFIAPI DestroyMenuPage ( IN EFI_MENU_PAGE *Page ); @@ -266,6 +267,7 @@ Returns: =20 =20 EFI_STATUS +EFIAPI DestroyMenuPage ( IN EFI_MENU_PAGE *Page ) diff --git a/TestFrameworkPkg/Sct/UI/BuildMenu.h b/TestFrameworkPkg/Sct/UI/= BuildMenu.h index 01ccdad..a2f4b80 100644 --- a/TestFrameworkPkg/Sct/UI/BuildMenu.h +++ b/TestFrameworkPkg/Sct/UI/BuildMenu.h @@ -20,7 +20,7 @@ // =20 #include "Sct.h" -#include "Ui.h" +#include "UI.h" =20 // // Definitions @@ -50,6 +50,7 @@ CreateStandardMenuPage ( ); =20 EFI_STATUS +EFIAPI DestroyMenuPage ( IN EFI_MENU_PAGE *Page ); @@ -169,6 +170,7 @@ DisplayMainMenu ( // =20 EFI_STATUS +EFIAPI DisplayConfigMenu ( IN EFI_MENU_PAGE *ParentPage ); @@ -178,6 +180,7 @@ DisplayConfigMenu ( // =20 EFI_STATUS +EFIAPI DisplayCaseMgmtMenu ( IN EFI_MENU_PAGE *ParentPage ); @@ -187,6 +190,7 @@ DisplayCaseMgmtMenu ( // =20 EFI_STATUS +EFIAPI DisplayProtocolMenu ( IN EFI_MENU_PAGE *ParentPage ); @@ -196,6 +200,7 @@ DisplayProtocolMenu ( // =20 EFI_STATUS +EFIAPI DisplayDriverMenu ( IN EFI_MENU_PAGE *ParentPage ); @@ -205,11 +210,13 @@ DisplayDriverMenu ( // =20 EFI_STATUS +EFIAPI DisplayFileNameMenu ( IN EFI_MENU_PAGE *ParentPage ); =20 EFI_STATUS +EFIAPI DisplaySequenceMenu ( IN EFI_MENU_PAGE *ParentPage ); @@ -228,6 +235,7 @@ DisplayCaseMenu ( //prototypes (from ResultMgmtMenu.c) // EFI_STATUS +EFIAPI DisplayResultMgmtMenu ( IN EFI_MENU_PAGE *ParentPage ); @@ -235,6 +243,7 @@ DisplayResultMgmtMenu ( //protypes (from UtilityMenu.c) // EFI_STATUS +EFIAPI DisplayUtilityMenu ( IN EFI_MENU_PAGE *ParentPage ); diff --git a/TestFrameworkPkg/Sct/UI/ConfigMenu.c b/TestFrameworkPkg/Sct/UI= /ConfigMenu.c index 8aebf4e..a679e21 100644 --- a/TestFrameworkPkg/Sct/UI/ConfigMenu.c +++ b/TestFrameworkPkg/Sct/UI/ConfigMenu.c @@ -12,7 +12,7 @@ =20 **/ =20 -#include "SCT.h" +#include "Sct.h" #include "BuildMenu.h" =20 // @@ -37,21 +37,25 @@ BOOLEAN ItemValueChanged =3D FALSE; // =20 EFI_STATUS +EFIAPI DisplayConfigMenu ( IN EFI_MENU_PAGE *ParentPage ); =20 EFI_STATUS +EFIAPI ConfigMenuEscFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI ConfigMenuSetDefaultFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI ConfigMenuDescPrintFunc ( IN EFI_MENU_ITEM *MenuItem, IN VOID *Context, @@ -64,6 +68,7 @@ ConfigMenuDescPrintFunc ( // =20 EFI_STATUS +EFIAPI DisplayConfigMenu ( IN EFI_MENU_PAGE *ParentPage ) @@ -511,6 +516,7 @@ Returns: } =20 EFI_STATUS +EFIAPI ConfigMenuSetDefaultFunc ( IN EFI_MENU_PAGE *MenuPage ) @@ -758,6 +764,7 @@ Returns: } =20 EFI_STATUS +EFIAPI ConfigMenuEscFunc ( IN EFI_MENU_PAGE *Page ) @@ -778,8 +785,7 @@ Returns: =20 --*/ { - EFI_STATUS Status; - EFI_MENU_ITEM *MenuItem; + EFI_MENU_ITEM *MenuItem; CHAR16 *FileName; UINTN TempValue; BOOLEAN TrueOrFalse; @@ -877,11 +883,11 @@ Returns: // //save config data into profile // - Status =3D SaveConfigData ( - gFT->DevicePath, - FileName, - gFT->ConfigData - ); + SaveConfigData ( + gFT->DevicePath, + FileName, + gFT->ConfigData + ); FreePool (FileName); } // @@ -898,6 +904,7 @@ Returns: } =20 EFI_STATUS +EFIAPI ConfigMenuDescPrintFunc ( IN EFI_MENU_ITEM *MenuItem, IN VOID *Context, diff --git a/TestFrameworkPkg/Sct/UI/Dialog.h b/TestFrameworkPkg/Sct/UI/Dia= log.h index d662602..90755b9 100644 --- a/TestFrameworkPkg/Sct/UI/Dialog.h +++ b/TestFrameworkPkg/Sct/UI/Dialog.h @@ -24,7 +24,7 @@ #include #include =20 -#include "Ui.h" +#include "UI.h" =20 #include =20 diff --git a/TestFrameworkPkg/Sct/UI/DisplayUi.c b/TestFrameworkPkg/Sct/UI/= DisplayUi.c index b04426c..2a000cf 100644 --- a/TestFrameworkPkg/Sct/UI/DisplayUi.c +++ b/TestFrameworkPkg/Sct/UI/DisplayUi.c @@ -45,21 +45,25 @@ SetScrollBarPos ( ); =20 EFI_STATUS +EFIAPI MenuBodyRefresh ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI MenuFooterRefresh ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI MenuBodyItemsRefresh ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI MenuItemRefresh ( IN EFI_MENU_PAGE *MenuPage, IN EFI_MENU_ITEM *Item, @@ -67,6 +71,7 @@ MenuItemRefresh ( ); =20 EFI_STATUS +EFIAPI MenuPageRefresh ( IN EFI_MENU_PAGE *MenuPage ); @@ -278,6 +283,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MenuHeaderRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -379,6 +385,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MenuBodyRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -728,6 +735,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MenuFooterRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -753,7 +761,6 @@ Returns: UINTN X1; UINTN Y1; UINTN Lines; - UINTN Columns; UINTN Xpos; UINTN Ypos; EFI_HOT_KEY *HotKey; @@ -775,7 +782,6 @@ Returns: X1 =3D MenuPage->Footer.FooterRect.BottomRight.Col; Y1 =3D MenuPage->Footer.FooterRect.BottomRight.Row; Lines =3D Y1-Y0+1; - Columns =3D X1-X0+1; Xpos =3D X0; Ypos =3D Y0; =20 @@ -868,6 +874,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MenuBodyItemsRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -1061,6 +1068,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MenuItemRefresh ( IN EFI_MENU_PAGE *MenuPage, IN EFI_MENU_ITEM *Item, @@ -1562,6 +1570,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MenuItemStatusRefresh ( IN EFI_MENU_PAGE *MenuPage, IN EFI_MENU_ITEM *Item, @@ -1752,6 +1761,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MenuPageRefresh ( IN EFI_MENU_PAGE *MenuPage ) diff --git a/TestFrameworkPkg/Sct/UI/FileDialog.c b/TestFrameworkPkg/Sct/UI= /FileDialog.c index c3e7732..4424dbc 100644 --- a/TestFrameworkPkg/Sct/UI/FileDialog.c +++ b/TestFrameworkPkg/Sct/UI/FileDialog.c @@ -2601,7 +2601,6 @@ Returns: EFI_INPUT_KEY Key; EFI_STATUS Status; EFI_FILE_HANDLE FHandle; - EFI_FILE_HANDLE TempHandle; BOOLEAN RET; CHAR16 *TempName; INTN Length; @@ -2631,7 +2630,6 @@ Returns: } else { ResultContextWasNull =3D FALSE; } - TempHandle =3D ResultContext->FHandle; =20 // //set the new file diff --git a/TestFrameworkPkg/Sct/UI/FileDialog.h b/TestFrameworkPkg/Sct/UI= /FileDialog.h index bfc2bf2..4801fc0 100644 --- a/TestFrameworkPkg/Sct/UI/FileDialog.h +++ b/TestFrameworkPkg/Sct/UI/FileDialog.h @@ -24,7 +24,7 @@ #include #include =20 -#include "Ui.h" +#include "UI.h" #include =20 // diff --git a/TestFrameworkPkg/Sct/UI/KeyFunction.c b/TestFrameworkPkg/Sct/U= I/KeyFunction.c index 34e683f..e585489 100644 --- a/TestFrameworkPkg/Sct/UI/KeyFunction.c +++ b/TestFrameworkPkg/Sct/UI/KeyFunction.c @@ -30,44 +30,52 @@ extern BOOLEAN gMenuExit; //protypes (external) // EFI_STATUS +EFIAPI DoDefault ( IN EFI_MENU_PAGE *MenuPage, IN EFI_INPUT_KEY *InKey ); =20 EFI_STATUS +EFIAPI UpFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI DownFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI DoEdit ( IN EFI_MENU_PAGE *MenuPage, IN OUT EFI_INPUT_KEY *InKey ); =20 EFI_STATUS +EFIAPI DoIterEdit ( IN EFI_MENU_PAGE *MenuPage, IN OUT EFI_INPUT_KEY *InKey ); =20 EFI_STATUS +EFIAPI SpaceFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI LeftArrowFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI RightArrowFunc ( IN EFI_MENU_PAGE *MenuPage ); @@ -110,6 +118,7 @@ CompareNumberString ( // =20 EFI_STATUS +EFIAPI DoDefault ( IN EFI_MENU_PAGE *MenuPage, IN EFI_INPUT_KEY *InKey @@ -141,6 +150,7 @@ Returns: } =20 EFI_STATUS +EFIAPI UpFunc ( IN EFI_MENU_PAGE *MenuPage ) @@ -237,6 +247,7 @@ Returns: } =20 EFI_STATUS +EFIAPI DownFunc ( IN EFI_MENU_PAGE *MenuPage ) @@ -359,6 +370,7 @@ Returns: } =20 EFI_STATUS +EFIAPI PageUpFunc ( IN EFI_MENU_PAGE *MenuPage ) @@ -469,6 +481,7 @@ Returns: } =20 EFI_STATUS +EFIAPI PageDownFunc ( IN EFI_MENU_PAGE *MenuPage ) @@ -603,6 +616,7 @@ Returns: =20 =20 EFI_STATUS +EFIAPI DoEdit ( IN EFI_MENU_PAGE *MenuPage, IN OUT EFI_INPUT_KEY *InKey @@ -1425,6 +1439,7 @@ Returns: } =20 EFI_STATUS +EFIAPI SpaceFunc( IN EFI_MENU_PAGE *MenuPage ) @@ -1542,6 +1557,7 @@ Returns: } =20 EFI_STATUS +EFIAPI LeftArrowFunc( IN EFI_MENU_PAGE *MenuPage ) @@ -1635,6 +1651,7 @@ Returns: } =20 EFI_STATUS +EFIAPI RightArrowFunc( IN EFI_MENU_PAGE *MenuPage ) @@ -2152,6 +2169,7 @@ Returns: } =20 EFI_STATUS +EFIAPI DoIterEdit ( IN EFI_MENU_PAGE *MenuPage, IN OUT EFI_INPUT_KEY *InKey diff --git a/TestFrameworkPkg/Sct/UI/LogFileDialog.c b/TestFrameworkPkg/Sct= /UI/LogFileDialog.c index 9b16ad8..e10fa73 100644 --- a/TestFrameworkPkg/Sct/UI/LogFileDialog.c +++ b/TestFrameworkPkg/Sct/UI/LogFileDialog.c @@ -2370,7 +2370,7 @@ Returns: if (*Ptr =3D=3D '\\' && *(Ptr+1) =3D=3D '.' && *(Ptr+2) =3D=3D '.' && = *(Ptr+3) !=3D 0) { =20 // - // Convert \Name\..\ to \ + // Convert "\Name\..\" to "\" // DO NOT convert the .. if it is at the end of the string. This wi= ll // break the .. behavior in changing directories. // @@ -2380,7 +2380,7 @@ Returns: } else if (*Ptr =3D=3D '\\' && *(Ptr+1) =3D=3D '.' && *(Ptr + 2) =3D= =3D '\\') { =20 // - // Convert a \.\ to a \ + // Convert a "\.\" to a "\" // StrCpy (TempStr, Ptr + 2); StrCpy (Ptr, TempStr); diff --git a/TestFrameworkPkg/Sct/UI/LogFileDialog.h b/TestFrameworkPkg/Sct= /UI/LogFileDialog.h index 1db7f09..10b21ac 100644 --- a/TestFrameworkPkg/Sct/UI/LogFileDialog.h +++ b/TestFrameworkPkg/Sct/UI/LogFileDialog.h @@ -24,7 +24,7 @@ #include #include =20 -#include "Ui.h" +#include "UI.h" #include =20 // diff --git a/TestFrameworkPkg/Sct/UI/MainMenu.c b/TestFrameworkPkg/Sct/UI/M= ainMenu.c index c44b406..cc79f8b 100644 --- a/TestFrameworkPkg/Sct/UI/MainMenu.c +++ b/TestFrameworkPkg/Sct/UI/MainMenu.c @@ -54,46 +54,55 @@ DisplayMainMenu ( // =20 VOID +EFIAPI DisplayDeviceConfig ( IN EFI_MENU_PAGE *Page ); =20 VOID +EFIAPI DisplayReportGenerator( IN EFI_MENU_PAGE *Page ); =20 VOID +EFIAPI DisplayLog( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI MainMenuEnterFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI MainMenuEscFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI MainMenuLoadSeqFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI MainMenuSaveSeqFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI MainMenuF9Func( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI MainMenuClearFunc ( IN EFI_MENU_PAGE *Page ); @@ -416,6 +425,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MainMenuEnterFunc ( IN EFI_MENU_PAGE *Page ) @@ -472,6 +482,7 @@ Reutrns =20 =20 EFI_STATUS +EFIAPI MainMenuEscFunc ( IN EFI_MENU_PAGE *Page ) @@ -506,6 +517,7 @@ Returns: } =20 VOID +EFIAPI DisplayDeviceConfig ( IN EFI_MENU_PAGE *Page ) @@ -548,6 +560,7 @@ DisplayDeviceConfig ( } =20 VOID +EFIAPI DisplayReportGenerator( IN EFI_MENU_PAGE *Page ) @@ -661,6 +674,7 @@ DisplayReportGenerator( =20 =20 VOID +EFIAPI DisplayLog ( IN EFI_MENU_PAGE *Page ) @@ -767,6 +781,7 @@ DisplayLog ( } =20 EFI_STATUS +EFIAPI MainMenuLoadSeqFunc ( IN EFI_MENU_PAGE *Page ) @@ -853,6 +868,7 @@ MainMenuLoadSeqFunc ( =20 =20 EFI_STATUS +EFIAPI MainMenuSaveSeqFunc ( IN EFI_MENU_PAGE *Page ) @@ -944,6 +960,7 @@ MainMenuSaveSeqFunc ( } =20 EFI_STATUS +EFIAPI MainMenuF9Func( IN EFI_MENU_PAGE *Page ) @@ -1004,6 +1021,7 @@ Returns: } =20 EFI_STATUS +EFIAPI MainMenuClearFunc ( IN EFI_MENU_PAGE *Page ) diff --git a/TestFrameworkPkg/Sct/UI/TestNodeMenu.c b/TestFrameworkPkg/Sct/= UI/TestNodeMenu.c index 0cdf597..72ac50e 100644 --- a/TestFrameworkPkg/Sct/UI/TestNodeMenu.c +++ b/TestFrameworkPkg/Sct/UI/TestNodeMenu.c @@ -40,26 +40,31 @@ DisplayTestNodeMenu ( // Prototypes (internal) // EFI_STATUS +EFIAPI TestNodeMenuEnterFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI TestNodeMenuEscFunc ( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI TestNodeMenuSpaceFunc( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI TestNodeMenuF9Func( IN EFI_MENU_PAGE *Page ); =20 EFI_STATUS +EFIAPI TestNodeMenuF8Func( IN EFI_MENU_PAGE *Page ); @@ -87,6 +92,7 @@ UnSelectTestNode ( ); =20 EFI_STATUS +EFIAPI TestNodeMenuDescPrintFunc ( IN EFI_MENU_ITEM *MenuItem, IN VOID *Context, @@ -388,6 +394,7 @@ Returns: } =20 EFI_STATUS +EFIAPI TestNodeMenuEnterFunc ( IN EFI_MENU_PAGE *Page ) @@ -449,6 +456,7 @@ Returns: } =20 EFI_STATUS +EFIAPI TestNodeMenuEscFunc ( IN EFI_MENU_PAGE *Page ) @@ -586,6 +594,7 @@ Returns: =20 =20 EFI_STATUS +EFIAPI TestNodeMenuSpaceFunc( IN EFI_MENU_PAGE *Page ) @@ -661,6 +670,7 @@ Returns: } =20 EFI_STATUS +EFIAPI TestNodeMenuF9Func( IN EFI_MENU_PAGE *Page ) @@ -721,6 +731,7 @@ Returns: } =20 EFI_STATUS +EFIAPI TestNodeMenuF8Func( IN EFI_MENU_PAGE *Page ) @@ -929,6 +940,7 @@ Arguments: } =20 EFI_STATUS +EFIAPI TestNodeMenuDescPrintFunc ( IN EFI_MENU_ITEM *MenuItem, IN VOID *Context, diff --git a/TestFrameworkPkg/Sct/UI/TestNodeMenu.h b/TestFrameworkPkg/Sct/= UI/TestNodeMenu.h index 8f86bfb..84348c1 100644 --- a/TestFrameworkPkg/Sct/UI/TestNodeMenu.h +++ b/TestFrameworkPkg/Sct/UI/TestNodeMenu.h @@ -20,7 +20,7 @@ // =20 #include "Sct.h" -#include "Ui.h" +#include "UI.h" #include "BuildMenu.h" #include "Dialog.h" =20 diff --git a/TestFrameworkPkg/Sct/UI/UI.h b/TestFrameworkPkg/Sct/UI/UI.h index dbd2d41..6304c78 100644 --- a/TestFrameworkPkg/Sct/UI/UI.h +++ b/TestFrameworkPkg/Sct/UI/UI.h @@ -242,6 +242,7 @@ Returns: =20 =20 EFI_STATUS +EFIAPI MenuHeaderRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -264,6 +265,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI MenuBodyRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -290,6 +292,7 @@ Returns: // =20 EFI_STATUS +EFIAPI MenuBodyItemsRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -312,6 +315,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI MenuItemRefresh ( IN EFI_MENU_PAGE *MenuPage, IN EFI_MENU_ITEM *Item, @@ -338,6 +342,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI MenuItemStatusRefresh( IN EFI_MENU_PAGE *MenuPage, IN EFI_MENU_ITEM *Item, @@ -363,6 +368,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI MenuFooterRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -385,6 +391,7 @@ Returns: ; =20 EFI_STATUS +EFIAPI MenuPageRefresh ( IN EFI_MENU_PAGE *MenuPage ) @@ -463,12 +470,14 @@ DisplayMessage ( ); =20 EFI_STATUS +EFIAPI DoEdit ( IN EFI_MENU_PAGE *MenuPage, IN EFI_INPUT_KEY *InKey ); =20 EFI_STATUS +EFIAPI DoIterEdit ( IN EFI_MENU_PAGE *MenuPage, IN EFI_INPUT_KEY *InKey @@ -479,36 +488,43 @@ DoIterEdit ( // =20 EFI_STATUS +EFIAPI UpFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI DownFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI PageUpFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI PageDownFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI SpaceFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI LeftArrowFunc ( IN EFI_MENU_PAGE *MenuPage ); =20 EFI_STATUS +EFIAPI RightArrowFunc ( IN EFI_MENU_PAGE *MenuPage ); diff --git a/TestFrameworkPkg/Support/StandardTest/StandardTest.c b/TestFra= meworkPkg/Support/StandardTest/StandardTest.c index 8ea22dd..270dc76 100644 --- a/TestFrameworkPkg/Support/StandardTest/StandardTest.c +++ b/TestFrameworkPkg/Support/StandardTest/StandardTest.c @@ -335,7 +335,6 @@ StslCloseAllFiles ( IN STANDARD_TEST_PRIVATE_DATA *Private ) { - EFI_STATUS Status; EFI_TEST_OUTPUT_LIBRARY_PROTOCOL *Output; EFI_LIB_CONFIG_FILE_HANDLE *FileConf; =20 @@ -346,10 +345,10 @@ StslCloseAllFiles ( // FileConf =3D &Private->SystemLogFile; if (FileConf->FileHandle !=3D NULL) { - Status =3D Output->Close ( - Output, - FileConf->FileHandle - ); + Output->Close ( + Output, + FileConf->FileHandle + ); FileConf->FileHandle =3D NULL; } =20 @@ -358,10 +357,10 @@ StslCloseAllFiles ( // FileConf =3D &Private->SystemKeyFile; if (FileConf->FileHandle !=3D NULL) { - Status =3D Output->Close ( - Output, - FileConf->FileHandle - ); + Output->Close ( + Output, + FileConf->FileHandle + ); FileConf->FileHandle =3D NULL; } =20 @@ -370,10 +369,10 @@ StslCloseAllFiles ( // FileConf =3D &Private->CaseLogFile; if (FileConf->FileHandle !=3D NULL) { - Status =3D Output->Close ( - Output, - FileConf->FileHandle - ); + Output->Close ( + Output, + FileConf->FileHandle + ); FileConf->FileHandle =3D NULL; } =20 @@ -382,10 +381,10 @@ StslCloseAllFiles ( // FileConf =3D &Private->CaseKeyFile; if (FileConf->FileHandle !=3D NULL) { - Status =3D Output->Close ( - Output, - FileConf->FileHandle - ); + Output->Close ( + Output, + FileConf->FileHandle + ); FileConf->FileHandle =3D NULL; } =20 @@ -1712,4 +1711,3 @@ Returns: =20 return Status; } - diff --git a/TestFrameworkPkg/Support/TestLogging/TestLogging.c b/TestFrame= workPkg/Support/TestLogging/TestLogging.c index 703aae9..16f12c7 100644 --- a/TestFrameworkPkg/Support/TestLogging/TestLogging.c +++ b/TestFrameworkPkg/Support/TestLogging/TestLogging.c @@ -89,7 +89,6 @@ TllCloseAllFiles ( TEST_LOGGING_PRIVATE_DATA *Private ) { - EFI_STATUS Status; EFI_TEST_OUTPUT_LIBRARY_PROTOCOL *Output; EFI_LIB_CONFIG_FILE_HANDLE *FileConf; =20 @@ -100,10 +99,10 @@ TllCloseAllFiles ( // FileConf =3D &Private->SystemLogFile; if (FileConf->FileHandle !=3D NULL) { - Status =3D Output->Close ( - Output, - FileConf->FileHandle - ); + Output->Close ( + Output, + FileConf->FileHandle + ); FileConf->FileHandle =3D NULL; } =20 @@ -112,10 +111,10 @@ TllCloseAllFiles ( // FileConf =3D &Private->CaseLogFile; if (FileConf->FileHandle !=3D NULL) { - Status =3D Output->Close ( - Output, - FileConf->FileHandle - ); + Output->Close ( + Output, + FileConf->FileHandle + ); FileConf->FileHandle =3D NULL; } =20 diff --git a/TestFrameworkPkg/Support/TestProfile/TestProfile.c b/TestFrame= workPkg/Support/TestProfile/TestProfile.c index ca405d3..f02e9df 100644 --- a/TestFrameworkPkg/Support/TestProfile/TestProfile.c +++ b/TestFrameworkPkg/Support/TestProfile/TestProfile.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -93,326 +94,52 @@ CHAR16 *gAtslDescription =3D L"EFI Test Profile Librar= y"; // // Internal functions // -#define toupper(c) (((c <=3D 'z') && (c >=3D 'a')) ? (c + 'A' - 'a') : c) -#define tolower(c) (((c <=3D 'Z') && (c >=3D 'A')) ? (c - 'A' + 'a') : c) - -VOID * -TestProfile_memset( - VOID *b, - INTN c, - UINTN len - ) -{ - volatile CHAR8 *p; - UINTN i; - - p =3D b; - for (i =3D 0; i < len; i++) { - p[i] =3D (CHAR8)c; - } - return ((VOID *)p); -} - -VOID* -malloc ( - UINTN size - ) -{ - VOID *pMem; - - if (gBS->AllocatePool (EfiBootServicesData, size, &pMem) !=3D EFI_SUCCES= S) { - return NULL; - } - return pMem; -} - -VOID * -calloc( - UINTN NMemb, - UINTN MembSize - ) -{ - UINTN NewSize; - VOID *NewMem; - - NewSize =3D NMemb * MembSize; - NewMem =3D malloc (NewSize); - if (NewMem) { - TestProfile_memset (NewMem, 0, NewSize); - } - - return NewMem; -} - -VOID -free ( - VOID *addr - ) -{ - gBS->FreePool (addr); -} - -INTN -memcmp( - VOID *s1, - VOID *s2, - UINTN n - ) -{ - CHAR8 *p1, *p2; - - p1 =3D s1; - p2 =3D s2; - if (n !=3D 0) { - do { - if (*p1++ !=3D *p2++) - return (*--p1 - *--p2); - } while (--n !=3D 0); - } - return (0); -} - -VOID * -memcpy( - VOID *dst, - VOID *src, - UINTN len - ) -{ - CHAR8 *d, *s; - - d =3D dst; - s =3D src; - while (len--) { - *(d++) =3D *(s++); - } - return dst; -} - -CHAR8 * -strchr( - CHAR8 *p, - INTN ch - ) -{ - for (; ; ++p) { - if (*p =3D=3D ch) - return((CHAR8 *)p); - if (!*p) - return((CHAR8 *)NULL); - } - /* NOTREACHED */ -} - -INTN -strcmp( - CHAR8 *s1, - CHAR8 *s2 - ) -{ - while (*s1 =3D=3D *s2++) { - if (*s1++ =3D=3D 0) - return 0; - } - return (*s1 - *s2 - 1); -} - -INTN -stricmp( - CHAR8 *s1, - CHAR8 *s2 - ) -{ - while (toupper(*s1) =3D=3D toupper(*s2)) { - s2++; - if (*s1++ =3D=3D 0) - return (0); - } - return (*s1 - *s2); -} - -CHAR8 * -strcpy( - CHAR8 *to, - CHAR8 *from - ) -{ - CHAR8 *save; - - save =3D to; - for (; (*to =3D *from) !=3D 0 ; ++from, ++to) - ; - return(save); -} - -CHAR8 * -strncpy( - CHAR8 *dst, - CHAR8 *src, - UINTN n - ) -{ - volatile CHAR8 *d; - CHAR8 *s; - - d =3D dst; - s =3D src; - if (n !=3D 0) { - do { - if ((*d++ =3D *s++) =3D=3D 0) { - /* NUL pad the remaining n-1 bytes */ - while (--n !=3D 0) - *d++ =3D 0; - break; - } - } while (--n !=3D 0); - } - return (dst); -} - -UINTN -strlen( - CHAR8 *str - ) -{ - CHAR8 *s; - - for (s =3D str; *s; ++s) - ; - return (UINTN)(s - str); -} - CHAR8 * -strdup( - CHAR8 *str +AsciiDuplicateString ( + CHAR8 *str ) { - CHAR8 *copy; - - if (str !=3D NULL) { - copy =3D malloc(strlen(str) + 1); - if (copy !=3D NULL) - return strcpy(copy, str); - } - return NULL; -} - -CHAR8 * -strcat( - CHAR8 *s, - CHAR8 *append -) -{ - CHAR8 *save; - - save =3D s; - for (; *s; ++s) - ; - while ( (*s++ =3D *append++) !=3D 0) - ; - return(save); -} - -UINTN -wcslen( - CHAR16 *str - ) -{ - CHAR16 *s; - - for (s =3D str; *s; ++s) - ; - return (UINTN)(s - str); -} - -CHAR16 * -wcscpy( - CHAR16 *to, - CHAR16 *from - ) -{ - CHAR16 *save; - - save =3D to; - for (; (*to =3D *from) !=3D 0; ++from, ++to) - ; - return(save); + return (str =3D=3D NULL) ? NULL : AllocateCopyPool (AsciiStrSize (str), = str); } =20 CHAR16 * -wcsdup ( +UnicodeDuplicateString ( CHAR16 *str ) { - CHAR16 *copy; - - if (str !=3D NULL) { - copy =3D calloc(wcslen(str) + 1, sizeof(CHAR16)); - if (copy !=3D NULL) - return wcscpy(copy, str); - } - return NULL; -} - -CHAR16 * -wcschr( - CHAR16 *p, - INTN ch - ) -{ - for (;; ++p) { - if (*p =3D=3D ch) - return((CHAR16 *)p); - if (!*p) - return((CHAR16 *)NULL); - } - /* NOTREACHED */ + return (str =3D=3D NULL) ? NULL : AllocateCopyPool (StrSize (str), str); } =20 -UINTN -wcstombs( +INTN +TestProfile_wcstombs( CHAR8 *s, CHAR16 *pwcs, UINTN n ) { - UINTN cnt; - - cnt =3D 0; - if (!pwcs || !s) - return (UINTN)-1; + EFI_STATUS Status; =20 - while (n-- > 0) { - *s =3D (CHAR8) (*pwcs++ & 0x00ff); - if (*s++ =3D=3D 0) { - break; - } - ++cnt; + Status =3D UnicodeStrToAsciiStrS(pwcs, s, n); + if (EFI_ERROR (Status)) { + return -1; } - return (cnt); + return AsciiStrnLenS (s, n); } =20 -UINTN -mbstowcs( +INTN +TestProfile_mbstowcs( CHAR16 *pwcs, CHAR8 *s, UINTN n ) { - UINTN cnt; - - cnt =3D 0; - if (!pwcs || !s) - return (UINTN)-1; + EFI_STATUS Status; =20 - while (n-- > 0) { - *pwcs =3D (CHAR16)(*s++ & 0x00ff); - if (*pwcs++ =3D=3D 0) { - break; - } - ++cnt; + Status =3D AsciiStrToUnicodeStrS(s, pwcs, n); + if (EFI_ERROR (Status)) { + return -1; } - return (cnt); + return StrnLenS (pwcs, n); } =20 VOID @@ -435,15 +162,15 @@ Routine Description: ptrCur =3D IniFile->Head; =20 while (ptrCur !=3D NULL) { - free (ptrCur->ptrSection); - free (ptrCur->ptrEntry); - free (ptrCur->ptrValue); + FreePool (ptrCur->ptrSection); + FreePool (ptrCur->ptrEntry); + FreePool (ptrCur->ptrValue); ptrCur =3D ptrCur->ptrNext; } =20 while (IniFile->Head !=3D NULL) { ptrTmp =3D IniFile->Head->ptrNext; - free (IniFile->Head); + FreePool (IniFile->Head); IniFile->Head =3D ptrTmp; } IniFile->Tail =3D NULL; @@ -451,13 +178,13 @@ Routine Description: ptrCommentCur =3D IniFile->CommentLineHead; =20 while (ptrCommentCur !=3D NULL) { - free (ptrCommentCur->ptrComment); + FreePool (ptrCommentCur->ptrComment); ptrCommentCur =3D ptrCommentCur->ptrNext; } =20 while (IniFile->CommentLineHead !=3D NULL) { ptrCommentTmp =3D IniFile->CommentLineHead->ptrNext; - free (IniFile->CommentLineHead); + FreePool (IniFile->CommentLineHead); IniFile->CommentLineHead =3D ptrCommentTmp; } } @@ -484,7 +211,7 @@ Routine Description: // // skip '\n' & '\r' at end of comment line // - Length =3D (UINT32) strlen (ptrStr); + Length =3D (UINT32) AsciiStrLen (ptrStr); for (Index =3D Length; Index > 0; Index --) { if (ptrStr[Index - 1] !=3D '\n' && ptrStr[Index - 1] !=3D '\r') { break; @@ -492,11 +219,11 @@ Routine Description: } ptrStr[Index] =3D '\0'; =20 - ptrCommentLineNew =3D (COMMENTLINE *) malloc (sizeof(COMMENTLINE)); - ptrCommentLineNew->ptrComment =3D (CHAR8 *) calloc (strlen(ptrStr) + 1, = sizeof(CHAR8)); + ptrCommentLineNew =3D (COMMENTLINE *) AllocatePool (sizeof(COMMENTLINE)); + ptrCommentLineNew->ptrComment =3D (CHAR8 *) AllocateZeroPool (AsciiStrLe= n(ptrStr) + 1); =20 ptrCommentLineNew->commentNo =3D *commentNo; - strcpy (ptrCommentLineNew->ptrComment, ptrStr); + AsciiStrCpy (ptrCommentLineNew->ptrComment, ptrStr); =20 if (IniFile->CommentLineHead =3D=3D NULL) { IniFile->CommentLineHead =3D ptrCommentLineNew; @@ -534,7 +261,7 @@ Routine Description: // // skip '\n' & ' ' & '\r' at end of string // - Length =3D (UINT32) strlen (tmp); + Length =3D (UINT32) AsciiStrLen (tmp); for (Index =3D Length; Index > 0; Index --) { if (tmp[Index - 1] !=3D '\n' && tmp[Index - 1] !=3D ' ' && tmp[Index -= 1] !=3D '\r') { break; @@ -542,7 +269,7 @@ Routine Description: } =20 tmp[Index] =3D '\0'; - strcpy (ptrStr, tmp); + AsciiStrCpy (ptrStr, tmp); =20 return ptrStr; } @@ -590,34 +317,34 @@ Routine Description: CHAR8 *p, *q; INI *ptrItem; =20 - p =3D strchr (ptrStr, '['); - q =3D strchr (ptrStr, ']'); + p =3D AsciiStrStr (ptrStr, "["); + q =3D AsciiStrStr (ptrStr, "]"); =20 *q =3D '\0' ; =20 _alltrim (++p); =20 - if (strlen (p) <=3D MAX_STRING_LEN) { + if (AsciiStrLen (p) <=3D MAX_STRING_LEN) { if (*p =3D=3D '\0') { - strcpy (ptrSection, "UNKNOWN"); + AsciiStrCpy (ptrSection, "UNKNOWN"); } else { - strcpy (ptrSection, p); + AsciiStrCpy (ptrSection, p); } } else { - strncpy (ptrSection, p, MAX_STRING_LEN); + AsciiStrnCpy (ptrSection, p, MAX_STRING_LEN); ptrSection[MAX_STRING_LEN] =3D '\0'; } =20 - ptrItem =3D (INI *)malloc (sizeof(INI)); + ptrItem =3D (INI *)AllocatePool (sizeof(INI)); =20 - ptrItem->ptrSection =3D (CHAR8 *) calloc (strlen(ptrSection) + 1, sizeof= (CHAR8)); - ptrItem->ptrEntry =3D (CHAR8 *) calloc (1, sizeof(CHAR8)); - ptrItem->ptrValue =3D (CHAR8 *) calloc (1, sizeof(CHAR8)); + ptrItem->ptrSection =3D (CHAR8 *) AllocateZeroPool (AsciiStrLen(ptrSecti= on) + 1); + ptrItem->ptrEntry =3D (CHAR8 *) AllocateZeroPool (1); + ptrItem->ptrValue =3D (CHAR8 *) AllocateZeroPool (1); =20 ptrItem->commentNo =3D *commentNo; - strcpy (ptrItem->ptrSection, ptrSection); - strcpy (ptrItem->ptrEntry, ""); - strcpy (ptrItem->ptrValue, ""); + AsciiStrCpy (ptrItem->ptrSection, ptrSection); + AsciiStrCpy (ptrItem->ptrEntry, ""); + AsciiStrCpy (ptrItem->ptrValue, ""); =20 (*commentNo) ++; =20 @@ -639,38 +366,35 @@ Routine Description: --*/ { CHAR8 *p, *p2; - UINTN Len; =20 - p =3D strchr (ptrStr, '=3D'); + p =3D AsciiStrStr (ptrStr, "=3D"); =20 *p =3D '\0'; =20 _alltrim (ptrStr); =20 - if (strlen (ptrStr) <=3D MAX_STRING_LEN) { + if (AsciiStrLen (ptrStr) <=3D MAX_STRING_LEN) { if (*ptrStr =3D=3D '\0') { - strcpy (ptrEntry, "UNKNOWN"); + AsciiStrCpy (ptrEntry, "UNKNOWN"); } else { - strcpy (ptrEntry, ptrStr); + AsciiStrCpy (ptrEntry, ptrStr); } } else { - strncpy (ptrEntry, ptrStr, MAX_STRING_LEN); + AsciiStrnCpy (ptrEntry, ptrStr, MAX_STRING_LEN); ptrEntry[MAX_STRING_LEN] =3D '\0'; } =20 _alltrim (++ p); - p2 =3D strchr (p, '#'); + p2 =3D AsciiStrStr (p, "#"); if (p2 !=3D NULL) { *p2 =3D '\0'; _alltrim (p); } =20 - Len =3D strlen (p); - - if (strlen (p) <=3D MAX_STRING_LEN) { - strcpy (ptrValue, p); + if (AsciiStrLen (p) <=3D MAX_STRING_LEN) { + AsciiStrCpy (ptrValue, p); } else { - strncpy (ptrValue, p, MAX_STRING_LEN); + AsciiStrnCpy (ptrValue, p, MAX_STRING_LEN); ptrValue[MAX_STRING_LEN] =3D '\0'; } } @@ -695,28 +419,28 @@ Routine Description: CHAR8 ptrValue[MAX_STRING_LEN + 1]; INI *ptrItem; =20 - strcpy (ptrLine, _alltrim (ptrLine)); + AsciiStrCpy (ptrLine, _alltrim (ptrLine)); =20 if (*ptrLine =3D=3D '#') { // it's a comment line _getcomment (IniFile, ptrLine, commentNo); - } else if ((*ptrLine =3D=3D '[') && (strchr (ptrLine, ']') !=3D NULL)) { + } else if ((*ptrLine =3D=3D '[') && (AsciiStrStr (ptrLine, "]") !=3D NUL= L)) { // it's a section head _getsection (IniFile, ptrLine, ptrSection, commentNo); *isSectionGot =3D TRUE; - } else if (strchr (ptrLine, '=3D') !=3D NULL) { + } else if (AsciiStrStr (ptrLine, "=3D") !=3D NULL) { _getentry (ptrLine, ptrEntry, ptrValue); =20 if (*isSectionGot =3D=3D TRUE) { - ptrItem =3D (INI *)malloc (sizeof(INI)); - ptrItem->ptrSection =3D (CHAR8 *) calloc (strlen(ptrSection) + 1, si= zeof(CHAR8)); - ptrItem->ptrEntry =3D (CHAR8 *) calloc (strlen(ptrEntry) + 1, size= of(CHAR8)); - ptrItem->ptrValue =3D (CHAR8 *) calloc (strlen(ptrValue) + 1, size= of(CHAR8)); + ptrItem =3D (INI *)AllocatePool (sizeof(INI)); + ptrItem->ptrSection =3D (CHAR8 *) AllocateZeroPool (AsciiStrLen(ptrS= ection) + 1); + ptrItem->ptrEntry =3D (CHAR8 *) AllocateZeroPool (AsciiStrLen(ptrE= ntry) + 1); + ptrItem->ptrValue =3D (CHAR8 *) AllocateZeroPool (AsciiStrLen(ptrV= alue) + 1); =20 ptrItem->commentNo =3D *commentNo; - strcpy (ptrItem->ptrSection, ptrSection); - strcpy (ptrItem->ptrEntry, ptrEntry); - strcpy (ptrItem->ptrValue, ptrValue); + AsciiStrCpy (ptrItem->ptrSection, ptrSection); + AsciiStrCpy (ptrItem->ptrEntry, ptrEntry); + AsciiStrCpy (ptrItem->ptrValue, ptrValue); =20 (*commentNo) ++; =20 @@ -770,7 +494,7 @@ Routine Description: CurOrder =3D 0; ptrCur =3D Head; while (ptrCur !=3D NULL) { - if (stricmp (Section, ptrCur->ptrSection) =3D=3D 0) { + if (AsciiStriCmp (Section, ptrCur->ptrSection) =3D=3D 0) { if (CurOrder =3D=3D Order) { break; } @@ -796,18 +520,18 @@ Routine Description: --*/ { if (ptrItem->ptrSection !=3D NULL) { - free (ptrItem->ptrSection); + FreePool (ptrItem->ptrSection); ptrItem->ptrSection =3D NULL; } if (ptrItem->ptrEntry !=3D NULL) { - free (ptrItem->ptrEntry); + FreePool (ptrItem->ptrEntry); ptrItem->ptrEntry =3D NULL; } if (ptrItem->ptrValue !=3D NULL) { - free (ptrItem->ptrValue); + FreePool (ptrItem->ptrValue); ptrItem->ptrValue =3D NULL; } - free (ptrItem); + FreePool (ptrItem); } =20 VOID @@ -825,8 +549,8 @@ _rmComment ( while (ptrCmtCur !=3D NULL) { if (ptrCmtCur->commentNo =3D=3D ptrItem->commentNo) { ptrCmtNext =3D ptrCmtCur->ptrNext; - free (ptrCmtCur->ptrComment); - free (ptrCmtCur); + FreePool (ptrCmtCur->ptrComment); + FreePool (ptrCmtCur); if (ptrCmtPrev =3D=3D NULL) { *CmtHead =3D ptrCmtNext; } else { @@ -919,27 +643,27 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - wcscpy (String, L""); + StrCpy (String, L""); =20 - if (wcslen (Section) > MAX_STRING_LEN || wcslen(Entry) > MAX_STRING_LEN)= { + if (StrLen (Section) > MAX_STRING_LEN || StrLen(Entry) > MAX_STRING_LEN)= { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D= =3D -1) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1= ) { return EFI_INVALID_PARAMETER; } =20 - strcpy (tmpSection, ptrSection); + AsciiStrCpy (tmpSection, ptrSection); _alltrim (tmpSection); =20 - strcpy (tmpEntry, ptrEntry); + AsciiStrCpy (tmpEntry, ptrEntry); _alltrim (tmpEntry); =20 - if (strlen (tmpSection) =3D=3D 0 || strlen (tmpEntry) =3D=3D 0) { + if (AsciiStrLen (tmpSection) =3D=3D 0 || AsciiStrLen (tmpEntry) =3D=3D 0= ) { return EFI_INVALID_PARAMETER; } =20 @@ -956,17 +680,17 @@ Returns: // // the same, so find the field // - if ((stricmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) && - (stricmp (tmpEntry, ptrCur->ptrEntry) =3D=3D 0)) { - if (strlen (ptrCur->ptrValue) < *maxLength) { - strcpy (ptrString, ptrCur->ptrValue); - mbstowcs (String, ptrString, strlen(ptrString) + 1); + if ((AsciiStriCmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) && + (AsciiStriCmp (tmpEntry, ptrCur->ptrEntry) =3D=3D 0)) { + if (AsciiStrLen (ptrCur->ptrValue) < *maxLength) { + AsciiStrCpy (ptrString, ptrCur->ptrValue); + TestProfile_mbstowcs (String, ptrString, AsciiStrLen(ptrString) + = 1); return EFI_SUCCESS; } else { - strncpy (ptrString, ptrCur->ptrValue, *maxLength - 1); + AsciiStrnCpy (ptrString, ptrCur->ptrValue, *maxLength - 1); ptrString[*maxLength-1] =3D '\0'; - mbstowcs (String, ptrString, strlen(ptrString) + 1); - *maxLength =3D (UINT32) (strlen (ptrCur->ptrValue) + 1); + TestProfile_mbstowcs (String, ptrString, AsciiStrLen(ptrString) + = 1); + *maxLength =3D (UINT32) (AsciiStrLen (ptrCur->ptrValue) + 1); return EFI_BUFFER_TOO_SMALL; } } @@ -1030,35 +754,35 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - if (wcslen (Section) > MAX_STRING_LEN || - wcslen (Entry) > MAX_STRING_LEN || - wcslen (String) > MAX_STRING_LEN) { + if (StrLen (Section) > MAX_STRING_LEN || + StrLen (Entry) > MAX_STRING_LEN || + StrLen (String) > MAX_STRING_LEN) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D= =3D -1) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1= ) { return EFI_INVALID_PARAMETER; } =20 - strcpy (tmpSection, ptrSection); + AsciiStrCpy (tmpSection, ptrSection); _alltrim (tmpSection); =20 - strcpy (tmpEntry, ptrEntry); + AsciiStrCpy (tmpEntry, ptrEntry); _alltrim (tmpEntry); =20 - if (strlen (tmpSection) =3D=3D 0 || strlen (tmpEntry) =3D=3D 0) { + if (AsciiStrLen (tmpSection) =3D=3D 0 || AsciiStrLen (tmpEntry) =3D=3D 0= ) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrString, String, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrString, String, MAX_STRING_LEN + 1) =3D=3D = -1) { return EFI_INVALID_PARAMETER; } =20 - strcpy (tmpString, ptrString); + AsciiStrCpy (tmpString, ptrString); _alltrim (tmpString); =20 // @@ -1067,14 +791,14 @@ Returns: ptrCur =3D Private->Head; ptrPrev =3D NULL; while (ptrCur !=3D NULL) { - if (stricmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) { - if (stricmp (tmpEntry, ptrCur->ptrEntry) =3D=3D 0) { - if (stricmp (tmpString, ptrCur->ptrValue) !=3D 0) { - tmpPtr =3D strdup (tmpString); + if (AsciiStriCmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) { + if (AsciiStriCmp (tmpEntry, ptrCur->ptrEntry) =3D=3D 0) { + if (AsciiStriCmp (tmpString, ptrCur->ptrValue) !=3D 0) { + tmpPtr =3D AsciiDuplicateString (tmpString); if (tmpPtr =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - free (ptrCur->ptrValue); + FreePool (ptrCur->ptrValue); ptrCur->ptrValue =3D tmpPtr; Private->Modified =3D TRUE; } @@ -1088,22 +812,21 @@ Returns: // // if not, should add a new item // - ptrNew =3D (INI *) malloc (sizeof(INI)); - TestProfile_memset (ptrNew, 0, sizeof(INI)); + ptrNew =3D (INI *) AllocateZeroPool (sizeof(INI)); if (ptrNew =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrSection =3D strdup (tmpSection); + ptrNew->ptrSection =3D AsciiDuplicateString (tmpSection); if (ptrNew->ptrSection =3D=3D NULL) { _freeItem (ptrNew); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrEntry =3D strdup (tmpEntry); + ptrNew->ptrEntry =3D AsciiDuplicateString (tmpEntry); if (ptrNew->ptrEntry =3D=3D NULL) { _freeItem (ptrNew); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrValue =3D strdup (tmpString); + ptrNew->ptrValue =3D AsciiDuplicateString (tmpString); if (ptrNew->ptrValue =3D=3D NULL) { _freeItem (ptrNew) ; return EFI_OUT_OF_RESOURCES; @@ -1128,24 +851,23 @@ Returns: // ptrCur =3D ptrNew; =20 - ptrNew =3D (INI *) malloc (sizeof(INI)); - TestProfile_memset (ptrNew, 0, sizeof(INI)); + ptrNew =3D (INI *) AllocateZeroPool (sizeof(INI)); if (ptrNew =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrSection =3D strdup (tmpSection); + ptrNew->ptrSection =3D AsciiDuplicateString (tmpSection); if (ptrNew->ptrSection =3D=3D NULL) { _freeItem (ptrNew); _freeItem (ptrCur); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrEntry =3D strdup (""); + ptrNew->ptrEntry =3D AsciiDuplicateString (""); if (ptrNew->ptrEntry =3D=3D NULL) { _freeItem (ptrNew); _freeItem (ptrCur); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrValue =3D strdup (""); + ptrNew->ptrValue =3D AsciiDuplicateString (""); if (ptrNew->ptrValue =3D=3D NULL) { _freeItem (ptrNew); _freeItem (ptrCur); @@ -1205,16 +927,16 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D= =3D -1) { return EFI_INVALID_PARAMETER; } - strcpy (tmpSection, ptrSection); + AsciiStrCpy (tmpSection, ptrSection); _alltrim (tmpSection); =20 ptrCur =3D Private->Head; ptrPrev =3D NULL; while (ptrCur !=3D NULL) { - if (stricmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) { + if (AsciiStriCmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) { Private->Modified =3D TRUE; _rmComment (&(Private->CommentLineHead), ptrCur); ptrNext =3D ptrCur->ptrNext; @@ -1296,27 +1018,27 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - wcscpy (String, L""); + StrCpy (String, L""); =20 - if (wcslen (Section) > MAX_STRING_LEN || wcslen (Entry) > MAX_STRING_LEN= ) { + if (StrLen (Section) > MAX_STRING_LEN || StrLen (Entry) > MAX_STRING_LEN= ) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D= =3D -1) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1= ) { return EFI_INVALID_PARAMETER; } =20 - strcpy (tmpSection, ptrSection); + AsciiStrCpy (tmpSection, ptrSection); _alltrim (tmpSection); =20 - strcpy (tmpEntry, ptrEntry); + AsciiStrCpy (tmpEntry, ptrEntry); _alltrim (tmpEntry); =20 - if (strlen (tmpSection) =3D=3D 0 || strlen (tmpEntry) =3D=3D 0) { + if (AsciiStrLen (tmpSection) =3D=3D 0 || AsciiStrLen (tmpEntry) =3D=3D 0= ) { return EFI_INVALID_PARAMETER; } =20 @@ -1341,17 +1063,17 @@ Returns: // break; } - if ((stricmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) && - (stricmp (tmpEntry, ptrCur->ptrEntry) =3D=3D 0)) { - if (strlen (ptrCur->ptrValue) < *maxLength) { - strcpy (ptrString, ptrCur->ptrValue); - mbstowcs (String, ptrString, strlen(ptrString) + 1); + if ((AsciiStriCmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) && + (AsciiStriCmp (tmpEntry, ptrCur->ptrEntry) =3D=3D 0)) { + if (AsciiStrLen (ptrCur->ptrValue) < *maxLength) { + AsciiStrCpy (ptrString, ptrCur->ptrValue); + TestProfile_mbstowcs (String, ptrString, AsciiStrLen(ptrString) + = 1); return EFI_SUCCESS; } else { - strncpy (ptrString, ptrCur->ptrValue, *maxLength - 1); + AsciiStrnCpy (ptrString, ptrCur->ptrValue, *maxLength - 1); ptrString[*maxLength-1] =3D '\0'; - mbstowcs (String, ptrString, strlen(ptrString) + 1 ); - *maxLength =3D (UINT32) (strlen (ptrCur->ptrValue) + 1); + TestProfile_mbstowcs (String, ptrString, AsciiStrLen(ptrString) + = 1 ); + *maxLength =3D (UINT32) (AsciiStrLen (ptrCur->ptrValue) + 1); return EFI_BUFFER_TOO_SMALL; } } @@ -1417,35 +1139,35 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - if (wcslen (Section) > MAX_STRING_LEN || - wcslen (Entry) > MAX_STRING_LEN || - wcslen (String) > MAX_STRING_LEN) { + if (StrLen (Section) > MAX_STRING_LEN || + StrLen (Entry) > MAX_STRING_LEN || + StrLen (String) > MAX_STRING_LEN) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D= =3D -1) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrEntry, Entry, MAX_STRING_LEN + 1) =3D=3D -1= ) { return EFI_INVALID_PARAMETER; } =20 - strcpy (tmpSection, ptrSection); + AsciiStrCpy (tmpSection, ptrSection); _alltrim (tmpSection); =20 - strcpy (tmpEntry, ptrEntry); + AsciiStrCpy (tmpEntry, ptrEntry); _alltrim (tmpEntry); =20 - if (strlen (tmpSection) =3D=3D 0 || strlen (tmpEntry) =3D=3D 0) { + if (AsciiStrLen (tmpSection) =3D=3D 0 || AsciiStrLen (tmpEntry) =3D=3D 0= ) { return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrString, String, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrString, String, MAX_STRING_LEN + 1) =3D=3D = -1) { return EFI_INVALID_PARAMETER; } =20 - strcpy (tmpString, ptrString); + AsciiStrCpy (tmpString, ptrString); _alltrim (tmpString); =20 // @@ -1463,14 +1185,14 @@ Returns: // break; } - if ((stricmp (tmpSection, ptrCur->ptrSection ) =3D=3D 0) && - (stricmp (tmpEntry, ptrCur->ptrEntry ) =3D=3D 0)) { - if (stricmp( tmpString, ptrCur->ptrValue) !=3D 0) { - tmpPtr =3D strdup (tmpString); + if ((AsciiStriCmp (tmpSection, ptrCur->ptrSection ) =3D=3D 0) && + (AsciiStriCmp (tmpEntry, ptrCur->ptrEntry ) =3D=3D 0)) { + if (AsciiStriCmp( tmpString, ptrCur->ptrValue) !=3D 0) { + tmpPtr =3D AsciiDuplicateString (tmpString); if (tmpPtr =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - free (ptrCur->ptrValue); + FreePool (ptrCur->ptrValue); ptrCur->ptrValue =3D tmpPtr; Private->Modified =3D TRUE; } @@ -1483,22 +1205,21 @@ Returns: // // if not, should add a new item // - ptrNew =3D (INI *) malloc(sizeof(INI)); - TestProfile_memset (ptrNew, 0, sizeof(INI)); + ptrNew =3D (INI *) AllocateZeroPool (sizeof(INI)); if (ptrNew =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrSection =3D strdup (tmpSection); + ptrNew->ptrSection =3D AsciiDuplicateString (tmpSection); if (ptrNew->ptrSection =3D=3D NULL) { _freeItem (ptrNew); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrEntry =3D strdup (tmpEntry); + ptrNew->ptrEntry =3D AsciiDuplicateString (tmpEntry); if (ptrNew->ptrEntry =3D=3D NULL) { _freeItem (ptrNew); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrValue =3D strdup (tmpString); + ptrNew->ptrValue =3D AsciiDuplicateString (tmpString); if (ptrNew->ptrValue =3D=3D NULL) { _freeItem (ptrNew); return EFI_OUT_OF_RESOURCES; @@ -1523,24 +1244,23 @@ Returns: // ptrCur =3D ptrNew; =20 - ptrNew =3D (INI *)malloc (sizeof(INI)); - TestProfile_memset (ptrNew, 0, sizeof(INI)); + ptrNew =3D (INI *) AllocateZeroPool (sizeof(INI)); if (ptrNew =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrSection =3D strdup (tmpSection); + ptrNew->ptrSection =3D AsciiDuplicateString (tmpSection); if ( ptrNew->ptrSection =3D=3D NULL ) { _freeItem (ptrNew); _freeItem (ptrCur); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrEntry =3D strdup (""); + ptrNew->ptrEntry =3D AsciiDuplicateString (""); if ( ptrNew->ptrEntry =3D=3D NULL ) { _freeItem (ptrNew); _freeItem (ptrCur); return EFI_OUT_OF_RESOURCES; } - ptrNew->ptrValue =3D strdup (""); + ptrNew->ptrValue =3D AsciiDuplicateString (""); if ( ptrNew->ptrValue =3D=3D NULL ) { _freeItem (ptrNew); _freeItem (ptrCur); @@ -1603,10 +1323,10 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D= =3D -1) { return EFI_INVALID_PARAMETER; } - strcpy (tmpSection, ptrSection); + AsciiStrCpy (tmpSection, ptrSection); _alltrim (tmpSection); =20 ptrSect =3D _searchSection (Private->Head, Order, tmpSection); @@ -1692,17 +1412,17 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - if (wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D=3D -1) { + if (TestProfile_wcstombs (ptrSection, Section, MAX_STRING_LEN + 1) =3D= =3D -1) { return EFI_INVALID_PARAMETER; } =20 - strcpy (tmpSection, ptrSection); + AsciiStrCpy (tmpSection, ptrSection); _alltrim (tmpSection); =20 *OrderNum =3D 0; ptrCur =3D Private->Head; while (ptrCur !=3D NULL) { - if (stricmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) { + if (AsciiStriCmp (tmpSection, ptrCur->ptrSection) =3D=3D 0) { ++ (*OrderNum); } =20 @@ -1835,7 +1555,7 @@ Returns: } =20 ptrCur =3D Private->Head ; - strcpy (ptrCurSection, ""); + AsciiStrCpy (ptrCurSection, ""); first =3D TRUE; =20 // @@ -1865,10 +1585,10 @@ Returns: if (first) { first =3D FALSE; } else { - strcpy (Buffer, "\r\n"); - BufSize =3D strlen (Buffer); + AsciiStrCpy (Buffer, "\r\n"); + BufSize =3D AsciiStrLen (Buffer); if (Private->isUnicode) { - mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); + TestProfile_mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); BufSize *=3D 2; Status =3D Handle->Write (Handle, &BufSize, Line); } else { @@ -1889,11 +1609,11 @@ Returns: while (ptrCmtCur !=3D NULL) { if (ptrCmtCur->commentNo =3D=3D ptrCur->commentNo) { commentNo =3D ptrCmtCur->commentNo; - strcpy (Buffer, ptrCmtCur->ptrComment); - strcat (Buffer, "\r\n"); - BufSize =3D strlen (Buffer); + AsciiStrCpy (Buffer, ptrCmtCur->ptrComment); + AsciiStrCat (Buffer, "\r\n"); + BufSize =3D AsciiStrLen (Buffer); if (Private->isUnicode) { - mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); + TestProfile_mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); BufSize *=3D 2; Status =3D Handle->Write (Handle, &BufSize, Line); } else { @@ -1912,13 +1632,13 @@ Returns: // // new section, write the section head // - strcpy (ptrCurSection, ptrCur->ptrSection); - strcpy (Buffer, "["); - strcat (Buffer, ptrCurSection); - strcat (Buffer, "]\r\n"); - BufSize =3D strlen (Buffer); + AsciiStrCpy (ptrCurSection, ptrCur->ptrSection); + AsciiStrCpy (Buffer, "["); + AsciiStrCat (Buffer, ptrCurSection); + AsciiStrCat (Buffer, "]\r\n"); + BufSize =3D AsciiStrLen (Buffer); if (Private->isUnicode) { - mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); + TestProfile_mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); BufSize *=3D 2; Status =3D Handle->Write (Handle, &BufSize, Line); } else { @@ -1933,13 +1653,13 @@ Returns: // // write the entry and value line // - strcpy (Buffer, ptrCur->ptrEntry); - strcat (Buffer, "=3D"); - strcat (Buffer, ptrCur->ptrValue); - strcat (Buffer, "\r\n"); - BufSize =3D strlen (Buffer); + AsciiStrCpy (Buffer, ptrCur->ptrEntry); + AsciiStrCat (Buffer, "=3D"); + AsciiStrCat (Buffer, ptrCur->ptrValue); + AsciiStrCat (Buffer, "\r\n"); + BufSize =3D AsciiStrLen (Buffer); if (Private->isUnicode) { - mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); + TestProfile_mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); BufSize *=3D 2; Status =3D Handle->Write (Handle, &BufSize, Line); } else { @@ -1962,11 +1682,11 @@ Returns: commentNo ++; while (ptrCmtCur !=3D NULL) { if (ptrCmtCur->commentNo >=3D commentNo) { - strcpy (Buffer, ptrCmtCur->ptrComment); - strcat (Buffer, "\r\n"); - BufSize =3D strlen (Buffer); + AsciiStrCpy (Buffer, ptrCmtCur->ptrComment); + AsciiStrCat (Buffer, "\r\n"); + BufSize =3D AsciiStrLen (Buffer); if (Private->isUnicode) { - mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); + TestProfile_mbstowcs ((CHAR16 *)Line, Buffer, BufSize + 1); BufSize *=3D 2; Status =3D Handle->Write (Handle, &BufSize, Line); } else { @@ -2041,15 +1761,15 @@ Routine Description: IniFile->Handle.GetOrderNum =3D NULL; IniFile->Handle.Flush =3D NULL; if (IniFile->FileName !=3D NULL) { - free (IniFile->FileName); + FreePool (IniFile->FileName); IniFile->FileName =3D NULL; } if (IniFile->DevPath !=3D NULL) { - free (IniFile->DevPath); + FreePool (IniFile->DevPath); IniFile->DevPath =3D NULL; } _freePointer(IniFile); - free (IniFile); + FreePool (IniFile); } =20 EFI_STATUS @@ -2104,20 +1824,20 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - if (wcslen (FileName) > MAX_STRING_LEN) { + if (StrLen (FileName) > MAX_STRING_LEN) { return EFI_INVALID_PARAMETER; } =20 // // New and initialize a ini file // - NewIniFile =3D malloc (sizeof(EFI_INI_FILE_PRIVATE_DATA)); + NewIniFile =3D AllocatePool (sizeof(EFI_INI_FILE_PRIVATE_DATA)); if (NewIniFile =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } _initFile (NewIniFile); =20 - NewIniFile->FileName =3D wcsdup (FileName); + NewIniFile->FileName =3D UnicodeDuplicateString (FileName); if ( NewIniFile->FileName =3D=3D NULL ) { _freeIniFile (NewIniFile); return EFI_OUT_OF_RESOURCES; @@ -2324,20 +2044,20 @@ Returns: return EFI_INVALID_PARAMETER; } =20 - if (wcslen (FileName) > MAX_STRING_LEN) { + if (StrLen (FileName) > MAX_STRING_LEN) { return EFI_INVALID_PARAMETER; } =20 // // New and initialize a ini file // - NewIniFile =3D malloc (sizeof(EFI_INI_FILE_PRIVATE_DATA)); + NewIniFile =3D AllocatePool (sizeof(EFI_INI_FILE_PRIVATE_DATA)); if (NewIniFile =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } _initFile (NewIniFile); =20 - NewIniFile->FileName =3D wcsdup (FileName); + NewIniFile->FileName =3D UnicodeDuplicateString (FileName); if ( NewIniFile->FileName =3D=3D NULL ) { _freeIniFile (NewIniFile); return EFI_OUT_OF_RESOURCES; @@ -2735,6 +2455,7 @@ Returns: } =20 EFI_STATUS +EFIAPI TslInitUnload ( IN EFI_HANDLE ImageHandle ) @@ -2881,4 +2602,3 @@ Returns: =20 return Status; } - diff --git a/TestFrameworkPkg/Support/TestProfile/TestProfile.inf b/TestFra= meworkPkg/Support/TestProfile/TestProfile.inf index c8fc148..bb6c3f8 100644 --- a/TestFrameworkPkg/Support/TestProfile/TestProfile.inf +++ b/TestFrameworkPkg/Support/TestProfile/TestProfile.inf @@ -34,6 +34,7 @@ UefiBootServicesTableLib BaseLib BaseMemoryLib + MemoryAllocationLib DevicePathLib DebugLib =20 --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:24:40 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1485942583516915.0916241960127; Wed, 1 Feb 2017 01:49:43 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 35DF781FC3; Wed, 1 Feb 2017 01:49:34 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 2A49081FAC for ; Wed, 1 Feb 2017 01:49:31 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 01 Feb 2017 01:49:31 -0800 Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.89.179]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2017 01:49:30 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,319,1477983600"; d="scan'208";a="59876496" From: Michael Kinney To: edk2-devel@lists.01.org Date: Wed, 1 Feb 2017 01:49:11 -0800 Message-Id: <1485942552-47388-6-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> References: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [staging/edk2-test PATCH V2 5/6] TestCasePkg: Fix XCODE compatibility issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Fish MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Michael Kinney Cc: Supreeth Venkatesh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Andrew Fish Reviewed-by: Supreeth Venkatesh --- TestCasePkg/Timer/ArchTimerBBTestConformance.c | 5 ++--- TestCasePkg/Timer/ArchTimerBBTestFunction.c | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/TestCasePkg/Timer/ArchTimerBBTestConformance.c b/TestCasePkg/T= imer/ArchTimerBBTestConformance.c index 8a4bd7c..58c4ade 100644 --- a/TestCasePkg/Timer/ArchTimerBBTestConformance.c +++ b/TestCasePkg/Timer/ArchTimerBBTestConformance.c @@ -47,7 +47,7 @@ BBTestRegisterHandlerConsistencyTest ( Status =3D gtBS->HandleProtocol ( SupportHandle, &gEfiStandardTestLibraryGuid, - &StandardLib + (VOID **)&StandardLib ); if (EFI_ERROR(Status)) { StandardLib->RecordAssertion ( @@ -217,7 +217,7 @@ BBTestGetTimerPeriodConsistencyTest ( Status =3D gtBS->HandleProtocol ( SupportHandle, &gEfiStandardTestLibraryGuid, - &StandardLib + (VOID **)&StandardLib ); if (EFI_ERROR(Status)) { StandardLib->RecordAssertion ( @@ -262,4 +262,3 @@ BBTestGetTimerPeriodConsistencyTest ( =20 return EFI_SUCCESS; } - diff --git a/TestCasePkg/Timer/ArchTimerBBTestFunction.c b/TestCasePkg/Time= r/ArchTimerBBTestFunction.c index 46be5c7..dc76bec 100644 --- a/TestCasePkg/Timer/ArchTimerBBTestFunction.c +++ b/TestCasePkg/Timer/ArchTimerBBTestFunction.c @@ -47,7 +47,7 @@ BBTestRegisterHandlerInterfaceTest ( Status =3D gtBS->HandleProtocol ( SupportHandle, &gEfiStandardTestLibraryGuid, - &StandardLib + (VOID **)&StandardLib ); if (EFI_ERROR(Status)) { StandardLib->RecordAssertion ( @@ -281,7 +281,7 @@ BBTestSetTimerPeriodInterfaceTest ( Status =3D gtBS->HandleProtocol ( SupportHandle, &gEfiStandardTestLibraryGuid, - &StandardLib + (VOID **)&StandardLib ); if (EFI_ERROR(Status)) { StandardLib->RecordAssertion ( @@ -609,7 +609,7 @@ BBTestGetTimerPeriodInterfaceTest ( Status =3D gtBS->HandleProtocol ( SupportHandle, &gEfiStandardTestLibraryGuid, - &StandardLib + (VOID **)&StandardLib ); if (EFI_ERROR(Status)) { StandardLib->RecordAssertion ( @@ -749,7 +749,7 @@ BBTestGenerateSoftInterruptInterfaceTest ( Status =3D gtBS->HandleProtocol ( SupportHandle, &gEfiStandardTestLibraryGuid, - &StandardLib + (VOID **)&StandardLib ); if (EFI_ERROR(Status)) { StandardLib->RecordAssertion ( --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:24:40 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1485942586188851.4459240069723; Wed, 1 Feb 2017 01:49:46 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 71A6882031; Wed, 1 Feb 2017 01:49:34 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 783F981FAF for ; Wed, 1 Feb 2017 01:49:31 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 01 Feb 2017 01:49:31 -0800 Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.89.179]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2017 01:49:31 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,319,1477983600"; d="scan'208";a="59876502" From: Michael Kinney To: edk2-devel@lists.01.org Date: Wed, 1 Feb 2017 01:49:12 -0800 Message-Id: <1485942552-47388-7-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> References: <1485942552-47388-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [staging/edk2-test PATCH V2 6/6] TestCasePkg: Fix GCC compatibility issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Fish MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Andrew Fish Cc: Supreeth Venkatesh Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney Reviewed-by: Supreeth Venkatesh --- TestCasePkg/Timer/ArchTimerBBTestConformance.c | 2 ++ TestCasePkg/Timer/ArchTimerBBTestFunction.c | 4 +++ TestCasePkg/Timer/ArchTimerBBTestMain.c | 4 ++- TestCasePkg/Timer/Guid.h | 41 +++++++++++++---------= ---- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/TestCasePkg/Timer/ArchTimerBBTestConformance.c b/TestCasePkg/T= imer/ArchTimerBBTestConformance.c index 58c4ade..5ceda59 100644 --- a/TestCasePkg/Timer/ArchTimerBBTestConformance.c +++ b/TestCasePkg/Timer/ArchTimerBBTestConformance.c @@ -28,6 +28,7 @@ // TDS 3.1 // EFI_STATUS +EFIAPI BBTestRegisterHandlerConsistencyTest ( IN EFI_BB_TEST_PROTOCOL *This, IN VOID *ClientInterface, @@ -199,6 +200,7 @@ BBTestRegisterHandlerConsistencyTest ( // TDS 3.2 // EFI_STATUS +EFIAPI BBTestGetTimerPeriodConsistencyTest ( IN EFI_BB_TEST_PROTOCOL *This, IN VOID *ClientInterface, diff --git a/TestCasePkg/Timer/ArchTimerBBTestFunction.c b/TestCasePkg/Time= r/ArchTimerBBTestFunction.c index dc76bec..9a78eec 100644 --- a/TestCasePkg/Timer/ArchTimerBBTestFunction.c +++ b/TestCasePkg/Timer/ArchTimerBBTestFunction.c @@ -27,6 +27,7 @@ // TDS 4.1 // EFI_STATUS +EFIAPI BBTestRegisterHandlerInterfaceTest ( IN EFI_BB_TEST_PROTOCOL *This, IN VOID *ClientInterface, @@ -259,6 +260,7 @@ BBTestRegisterHandlerInterfaceTest ( // TDS 4.2 // EFI_STATUS +EFIAPI BBTestSetTimerPeriodInterfaceTest ( IN EFI_BB_TEST_PROTOCOL *This, IN VOID *ClientInterface, @@ -584,6 +586,7 @@ BBTestSetTimerPeriodInterfaceTest ( // TDS 4.3 // EFI_STATUS +EFIAPI BBTestGetTimerPeriodInterfaceTest ( IN EFI_BB_TEST_PROTOCOL *This, IN VOID *ClientInterface, @@ -728,6 +731,7 @@ BBTestGetTimerPeriodInterfaceTest ( // TDS 4.4 // EFI_STATUS +EFIAPI BBTestGenerateSoftInterruptInterfaceTest ( IN EFI_BB_TEST_PROTOCOL *This, IN VOID *ClientInterface, diff --git a/TestCasePkg/Timer/ArchTimerBBTestMain.c b/TestCasePkg/Timer/Ar= chTimerBBTestMain.c index fc36c27..f41c8a6 100644 --- a/TestCasePkg/Timer/ArchTimerBBTestMain.c +++ b/TestCasePkg/Timer/ArchTimerBBTestMain.c @@ -88,7 +88,9 @@ EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] =3D { EFI_TEST_CASE_AUTO | EFI_TEST_CASE_RESET_REQUIRED, BBTestGenerateSoftInterruptInterfaceTest }, - 0 + { + ZERO_GUID + } }; =20 =20 diff --git a/TestCasePkg/Timer/Guid.h b/TestCasePkg/Timer/Guid.h index 47bcbc8..7b154fe 100644 --- a/TestCasePkg/Timer/Guid.h +++ b/TestCasePkg/Timer/Guid.h @@ -14,102 +14,101 @@ =20 =20 #define EFI_TEST_ARCHTIMERCONSISTENCYTEST_ASSERTION_001_GUID \ -{ 0x6c68726e, 0xa1c1, 0x450d, 0x91, 0x54, 0x0d, 0x73, 0x34, 0xa2, 0xa3, 0x= 62 } +{ 0x6c68726e, 0xa1c1, 0x450d, {0x91, 0x54, 0x0d, 0x73, 0x34, 0xa2, 0xa3, 0= x62 }} =20 extern EFI_GUID gArchTimerConsistencyTestAssertionGuid001; =20 #define EFI_TEST_ARCHTIMERCONSISTENCYTEST_ASSERTION_002_GUID \ -{ 0x762d3586, 0x3bad, 0x40a5, 0xa1, 0x16, 0x6f, 0x30, 0xa2, 0xb5, 0x6b, 0x= 2a } +{ 0x762d3586, 0x3bad, 0x40a5, {0xa1, 0x16, 0x6f, 0x30, 0xa2, 0xb5, 0x6b, 0= x2a }} =20 extern EFI_GUID gArchTimerConsistencyTestAssertionGuid002; =20 #define EFI_TEST_ARCHTIMERCONSISTENCYTEST_ASSERTION_003_GUID \ -{ 0xfb0fa1fe, 0xb026, 0x4f7f, 0xb2, 0x94, 0xeb, 0x01, 0x8a, 0x90, 0xf5, 0x= fc } +{ 0xfb0fa1fe, 0xb026, 0x4f7f, {0xb2, 0x94, 0xeb, 0x01, 0x8a, 0x90, 0xf5, 0= xfc }} =20 extern EFI_GUID gArchTimerConsistencyTestAssertionGuid003; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_001_GUID \ -{ 0x23dedf70, 0x457c, 0x4a97, 0x8f, 0x1b, 0xb2, 0xa6, 0xdc, 0xa3, 0x03, 0x= 4a } +{ 0x23dedf70, 0x457c, 0x4a97, {0x8f, 0x1b, 0xb2, 0xa6, 0xdc, 0xa3, 0x03, 0= x4a }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid001; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_002_GUID \ -{ 0xa371de14, 0x690e, 0x4e7a, 0xae, 0x75, 0x5c, 0x5d, 0x6f, 0x2e, 0x1a, 0x= bf } +{ 0xa371de14, 0x690e, 0x4e7a, {0xae, 0x75, 0x5c, 0x5d, 0x6f, 0x2e, 0x1a, 0= xbf }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid002; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_003_GUID \ -{ 0x0c553adc, 0xc3e7, 0x4bdb, 0xb7, 0x19, 0xe2, 0x25, 0x6f, 0x8b, 0xb7, 0x= 6d } +{ 0x0c553adc, 0xc3e7, 0x4bdb, {0xb7, 0x19, 0xe2, 0x25, 0x6f, 0x8b, 0xb7, 0= x6d }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid003; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_004_GUID \ -{ 0xa37674f4, 0xcac7, 0x426f, 0xbd, 0x42, 0xe6, 0xd4, 0x95, 0xec, 0xdb, 0x= 7d } +{ 0xa37674f4, 0xcac7, 0x426f, {0xbd, 0x42, 0xe6, 0xd4, 0x95, 0xec, 0xdb, 0= x7d }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid004; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_005_GUID \ -{ 0x204d0d9e, 0x9537, 0x4a16, 0x96, 0xea, 0x5a, 0x3d, 0xeb, 0x4b, 0xf6, 0x= 3e } +{ 0x204d0d9e, 0x9537, 0x4a16, {0x96, 0xea, 0x5a, 0x3d, 0xeb, 0x4b, 0xf6, 0= x3e }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid005; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_006_GUID \ -{ 0x67afcccd, 0xce79, 0x43e8, 0xab, 0x7f, 0x91, 0xcd, 0x84, 0x80, 0xae, 0x= fc } +{ 0x67afcccd, 0xce79, 0x43e8, {0xab, 0x7f, 0x91, 0xcd, 0x84, 0x80, 0xae, 0= xfc }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid006; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_007_GUID \ -{ 0x793a3655, 0x1dec, 0x4bf0, 0x88, 0xea, 0xa7, 0xb6, 0xf5, 0x18, 0x0a, 0x= 2a } +{ 0x793a3655, 0x1dec, 0x4bf0, {0x88, 0xea, 0xa7, 0xb6, 0xf5, 0x18, 0x0a, 0= x2a }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid007; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_008_GUID \ -{ 0xab6bdf70, 0xb727, 0x4731, 0xba, 0x36, 0x78, 0x69, 0x8d, 0x18, 0xce, 0x= 49 } +{ 0xab6bdf70, 0xb727, 0x4731, {0xba, 0x36, 0x78, 0x69, 0x8d, 0x18, 0xce, 0= x49 }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid008; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_009_GUID \ -{ 0x3632e6d6, 0x27e2, 0x46d6, 0xaa, 0xc2, 0x97, 0xc5, 0x1e, 0x83, 0xaa, 0x= 5c } +{ 0x3632e6d6, 0x27e2, 0x46d6, {0xaa, 0xc2, 0x97, 0xc5, 0x1e, 0x83, 0xaa, 0= x5c }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid009; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_010_GUID \ -{ 0x49cf6051, 0x74d0, 0x4ab7, 0x9c, 0xd2, 0x30, 0xb3, 0x69, 0xfe, 0xaf, 0x= 76 } +{ 0x49cf6051, 0x74d0, 0x4ab7, {0x9c, 0xd2, 0x30, 0xb3, 0x69, 0xfe, 0xaf, 0= x76 }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid010; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_011_GUID \ -{ 0x8d9692d1, 0x7772, 0x44b3, 0xad, 0x42, 0xa8, 0xda, 0x7f, 0x9b, 0x66, 0x= c8 } +{ 0x8d9692d1, 0x7772, 0x44b3, {0xad, 0x42, 0xa8, 0xda, 0x7f, 0x9b, 0x66, 0= xc8 }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid011; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_012_GUID \ -{ 0xb19dd34f, 0x3bae, 0x41eb, 0x92, 0xdf, 0x56, 0x9e, 0x80, 0x95, 0x21, 0x= 2f } +{ 0xb19dd34f, 0x3bae, 0x41eb, {0x92, 0xdf, 0x56, 0x9e, 0x80, 0x95, 0x21, 0= x2f }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid012; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_013_GUID \ -{ 0xe3bb8873, 0xcdf7, 0x4c4c, 0x96, 0x3f, 0xf6, 0xeb, 0x23, 0x2c, 0xa9, 0x= 05 } +{ 0xe3bb8873, 0xcdf7, 0x4c4c, {0x96, 0x3f, 0xf6, 0xeb, 0x23, 0x2c, 0xa9, 0= x05 }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid013; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_014_GUID \ -{ 0x3e2686aa, 0xaa79, 0x4f2a, 0xb8, 0xb2, 0xd4, 0x05, 0x37, 0xf2, 0x3e, 0x= c0 } +{ 0x3e2686aa, 0xaa79, 0x4f2a, {0xb8, 0xb2, 0xd4, 0x05, 0x37, 0xf2, 0x3e, 0= xc0 }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid014; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_015_GUID \ -{ 0x7d0e2fa0, 0xc40b, 0x47e3, 0x96, 0x70, 0xc8, 0x69, 0xe5, 0x2c, 0x29, 0x= 41 } +{ 0x7d0e2fa0, 0xc40b, 0x47e3, {0x96, 0x70, 0xc8, 0x69, 0xe5, 0x2c, 0x29, 0= x41 }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid015; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_016_GUID \ -{ 0xae2aae66, 0x2510, 0x47a5, 0x83, 0x6f, 0xdc, 0xd8, 0x55, 0xff, 0x9a, 0x= 32 } +{ 0xae2aae66, 0x2510, 0x47a5, {0x83, 0x6f, 0xdc, 0xd8, 0x55, 0xff, 0x9a, 0= x32 }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid016; =20 #define EFI_TEST_ARCHTIMERINTERFACETEST_ASSERTION_017_GUID \ -{ 0xdc368011, 0x1a7f, 0x4e3a, 0x8f, 0xaf, 0x70, 0x9e, 0x71, 0x85, 0x94, 0x= 5d } +{ 0xdc368011, 0x1a7f, 0x4e3a, {0x8f, 0xaf, 0x70, 0x9e, 0x71, 0x85, 0x94, 0= x5d }} =20 extern EFI_GUID gArchTimerInterfaceTestAssertionGuid017; - --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel