From 1be2ed90a20618d71ddf34b8a07d038da0b36854 Mon Sep 17 00:00:00 2001 From: Hess Chen Date: Fri, 15 Aug 2014 03:06:48 +0000 Subject: =?UTF-8?q?There=20is=20a=20limitation=20on=20WINDOWS=20OS=20for?= =?UTF-8?q?=20the=20length=20of=20entire=20file=20path=20can=E2=80=99t=20b?= =?UTF-8?q?e=20larger=20than=20255.=20There=20is=20an=20OS=20API=20provide?= =?UTF-8?q?d=20by=20Microsoft=20to=20add=20=E2=80=9C\\=3F\=E2=80=9D=20befo?= =?UTF-8?q?re=20the=20path=20header=20to=20support=20the=20long=20file=20p?= =?UTF-8?q?ath.=20Enable=20this=20feature=20on=20basetools.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen Reviewed-by: Yingke Liu git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/C/VfrCompile/VfrCompiler.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'BaseTools/Source/C/VfrCompile/VfrCompiler.cpp') diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp index bb2df3ed39..063266a91f 100644 --- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp @@ -2,7 +2,7 @@ VfrCompiler main class and main function. -Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -413,7 +413,7 @@ CVfrCompiler::Usage ( CONST CHAR8 *Help[] = { " ", "VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION, - "Copyright (c) 2004-2013 Intel Corporation. All rights reserved.", + "Copyright (c) 2004-2014 Intel Corporation. All rights reserved.", " ", "Usage: VfrCompile [options] VfrFile", " ", @@ -476,7 +476,7 @@ CVfrCompiler::PreProcess ( goto Out; } - if ((pVfrFile = fopen (mOptions.VfrFileName, "r")) == NULL) { + if ((pVfrFile = fopen (LongFilePath (mOptions.VfrFileName), "r")) == NULL) { DebugError (NULL, 0, 0001, "Error opening the input VFR file", mOptions.VfrFileName); goto Fail; } @@ -545,7 +545,7 @@ CVfrCompiler::Compile ( gCVfrErrorHandle.SetInputFile (InFileName); gCVfrErrorHandle.SetWarningAsError(mOptions.WarningAsError); - if ((pInFile = fopen (InFileName, "r")) == NULL) { + if ((pInFile = fopen (LongFilePath (InFileName), "r")) == NULL) { DebugError (NULL, 0, 0001, "Error opening the input file", InFileName); goto Fail; } @@ -699,7 +699,7 @@ CVfrCompiler::GenBinary ( } if (mOptions.CreateIfrPkgFile == TRUE) { - if ((pFile = fopen (mOptions.PkgOutputFileName, "wb")) == NULL) { + if ((pFile = fopen (LongFilePath (mOptions.PkgOutputFileName), "wb")) == NULL) { DebugError (NULL, 0, 0001, "Error opening file", mOptions.PkgOutputFileName); goto Fail; } @@ -742,7 +742,7 @@ CVfrCompiler::GenCFile ( } if (!mOptions.CreateIfrPkgFile || mOptions.CompatibleMode) { - if ((pFile = fopen (mOptions.COutputFileName, "w")) == NULL) { + if ((pFile = fopen (LongFilePath (mOptions.COutputFileName), "w")) == NULL) { DebugError (NULL, 0, 0001, "Error opening output C file", mOptions.COutputFileName); goto Fail; } @@ -789,12 +789,12 @@ CVfrCompiler::GenRecordListFile ( return; } - if ((pInFile = fopen (InFileName, "r")) == NULL) { + if ((pInFile = fopen (LongFilePath (InFileName), "r")) == NULL) { DebugError (NULL, 0, 0001, "Error opening the input VFR preprocessor output file", InFileName); return; } - if ((pOutFile = fopen (mOptions.RecordListFile, "w")) == NULL) { + if ((pOutFile = fopen (LongFilePath (mOptions.RecordListFile), "w")) == NULL) { DebugError (NULL, 0, 0001, "Error opening the record list file", mOptions.RecordListFile); goto Err1; } -- cgit v1.2.3