From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.7869.1602580860295058412 for ; Tue, 13 Oct 2020 02:21:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: bob.c.feng@intel.com) IronPort-SDR: MtwG4oB01pUGSlqaN0iLpXWuUyetfTxi55u5DEXqGG+oXm3OPW9Z3vNKPAvPf/qVYqTeIFz2dL kyjOmmOzV1TA== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="250573311" X-IronPort-AV: E=Sophos;i="5.77,369,1596524400"; d="scan'208";a="250573311" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 02:20:59 -0700 IronPort-SDR: 7ZT9eaCEQg/Sw8Drj5r0UhJDXqgxCV6a27jFaIX02dWLUt/BtysharD6Y7wyWJ2Is5rQJfj66z dVy8NIx7lb7A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,369,1596524400"; d="scan'208";a="530324363" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.66]) by orsmga005.jf.intel.com with ESMTP; 13 Oct 2020 02:20:57 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Yunhua Feng , Liming Gao Subject: [Patch] [edk2-staging]BaseTools/Fmmt: Fixed FMMT Linux build break issue Date: Tue, 13 Oct 2020 17:20:35 +0800 Message-Id: <20201013092035.24440-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fixed the FMMT Linux build issue which was introduced by the commit 950333853b5fe2b73a7b5148501458cc97a01481 Signed-off-by: Bob Feng Cc: Yunhua Feng Cc: Liming Gao --- .../Source/C/FMMT/FirmwareModuleManagement.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c index 20663ba163..8a7ae096d0 100644 --- a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c +++ b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c @@ -9,11 +9,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "FirmwareModuleManagement.h" #include "Rebase.h" #include #include - +#if defined(__linux__) +#include +#define _MAX_DIR PATH_MAX +#endif CHAR8* mGuidToolDefinition = "FmmtConf.ini"; extern EFI_FIRMWARE_VOLUME_HEADER *mFvHeader; extern UINT32 mFvLength; // @@ -1715,15 +1718,10 @@ FmmtImageExtract ( EFI_STATUS Status; FIRMWARE_DEVICE *FdData; FV_INFORMATION *FvInFd; UINT32 Index; UINT32 FfsFoundFlag; - FFS_INFORMATION *OutputFileName; - FILE* NewFdFile; - FILE* NewFvFile; - UINT64 NewFvLength; - VOID* Buffer; CHAR8 *TemDir; UINT8 FvNumInFd; UINT32 Offset; UINT8 *FdBuffer; EFI_FFS_FILE_HEADER2 *CurrentFile; @@ -1738,18 +1736,13 @@ FmmtImageExtract ( int j; CHAR8 FfsOutputFileName[_MAX_DIR]; FdSize = 0; Index = 0; - NewFvLength = 0; FfsFoundFlag = 0; FdData = NULL; FvInFd = NULL; - OutputFileName = NULL; - NewFdFile = NULL; - NewFvFile = NULL; - Buffer = NULL; TemDir = NULL; FvNumInFd = 0; Offset = 0; FdBuffer = NULL; if (sizeof(FfsOutFileOrDirName) > _MAX_DIR) { -- 2.20.1.windows.1