summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools: not report error for the optional items in the FmpTokensYonghong Zhu2017-01-062-10/+11
| | | | | | | | | | | | <FmpTokens> in the FDF spec defined some optional items, eg: IMAGE_INDEX, HARDWARE_INSTANCE. but current tool report error if no such item is exist in the FDF file. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=293 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: fix the bug for Mixed Pcd display in the reportYonghong Zhu2017-01-041-6/+15
| | | | | | | | | | Fix the bug to not display the mixed PCD in the Global PCD section, and correct the Pcd display name. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools toolsetup.bat: set PATH to include Bin Win32 directoryLiming Gao2017-01-041-0/+2
| | | | | | | | | | Bin Win32 directory includes antlr.exe. This tool is used when compile BaseTools source code. So, set it into PATH first. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools toolsetup.bat: Set env when the binary tools are missingLiming Gao2017-01-041-5/+5
| | | | | | | | | BASE_TOOLS_PATH is required to be set when the binary tools are missing. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix the bug for RAW file alignment value supportYonghong Zhu2016-12-291-0/+7
| | | | | | | | | | | | Fix the bug for RAW file to support Align=32 and Align=64. Current FDF spec FfsAlignmentValues support this two values, while it is not the valid value for GenFfs. So this patch add the logic to handle it. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=248 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/Ecc: Fix the issue of not recognizing "FILE_GUID"Hess Chen2016-12-291-1/+6
| | | | | | | | Fix the issue of not recognizing "FILE_GUID" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/Pccts: Resolve GCC sting format mismatch build warningHao Wu2016-12-231-1/+1
| | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=282 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools GCC makefile: disable unused-result warning for CPP fileLiming Gao2016-12-201-1/+1
| | | | | | | | | | This warning has been disabled for C file. To be same, it is also disabled for CPP file. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: fix write-strings build warningsHeyi Guo2016-12-201-1/+1
| | | | | | | | | | | | Fix build warnings of "deprecated conversion from string constant to ?CHAR8* {aka char*}? [-Wwrite-strings]" for BaseTools, while using "gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: fix format type build warningsHeyi Guo2016-12-202-10/+10
| | | | | | | | | | | | Fix build warnings of "format ?%d? expects argument of type ?int?, but argument 5 has type ?long unsigned int? [-Wformat=]" for BaseTools, while using "gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: fix format-security build warningsHeyi Guo2016-12-203-6/+6
| | | | | | | | | | | | Fix build warnings of "format not a string literal and no format arguments [-Wformat-security]" for BaseTools, while using "gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Correct bin wrappers for GenDepex.py pathYonghong Zhu2016-12-202-2/+2
| | | | | | | | | | | | The WindowsLike and PosixLike bin wrappers for GenDepex.py do not use correct path. GenDepex.py is not in a GenDepex directory. Instead, it is in the AutoGen directory. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=292 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Fix printf issue using '%ls' in format stringHao Wu2016-12-051-1/+68
| | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=257 For GCC compilers, when building with option '-fshort-wchar', wide char string format '%ls' does not work properly for printf() function. The string specified by '%ls' will not be printed. This commit avoids using '%ls' for printf() function and converts the wide char string to char string for printing. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Support QuotedString for PREBUILD/POSTBUILD in DSC fileYonghong Zhu2016-12-021-2/+14
| | | | | | | | | | | If the prebuild/postbuild script statement start with double quotations, current tool report error, while DSC spec allow this usage. so update tool to support it. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix the bug to parse the new map file formatYonghong Zhu2016-12-022-9/+16
| | | | | | | | | | Current the variable and Pcd format save in the map file is changed, so this patch is to support this new format. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: add error check for "#image" for idf file formatYonghong Zhu2016-12-021-1/+4
| | | | | | | | | | Add new error check for "#image" keyword used in the image definition file. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: fix the bug to add PaletteSize info into AutoGenYonghong Zhu2016-11-301-3/+4
| | | | | | | | | | Fix the bug to add PaletteSize info into AutoGen.c when the flag UEFI_HII_RESOURCE_SECTION is set to FALSE. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools CommonLib: Update ReadMemoryFileLine() to read line in file scopeLiming Gao2016-11-301-0/+3
| | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=255 Check CurrentFilePointer to make sure it not exceed the end of file. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix bug for decimal value of VPDPCD offset display in reportYonghong Zhu2016-11-291-1/+4
| | | | | | | | | | | current if we set VPD PCD's offset to a decimal value, eg: 22, this value is displayed incorrectly in the "FD VPD Region" section in the report.txt. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: report error for same Guid's Private definition conflictYonghong Zhu2016-11-231-0/+33
| | | | | | | | | | | Add error check for the same Guid/Protocol/PPIs/Includes defined as both Private and non-Private attribute. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=209 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools gitignore: Ignore VS intermediate files *.obj and *.pdbLiming Gao2016-11-181-0/+4
| | | | | | | | | | In V2, ignore .exe and .ilk files Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/BuildEnv: Do not modify the env 'PACKAGES_PATH' in BuildEnvHao Wu2016-11-181-5/+5
| | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=236 The script 'BuildEnv' modifies the value of the environment variable 'PACKAGES_PATH' (line 44). The script will substitute the ':' symbol (separating multiple paths) with a space. This is not supposed to happen since users might later use 'PACKAGES_PATH' during the code-building process under a multiple-workspace scenario. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools tools_def.txt: Include AutoGen.h in GCC ASLPP_FLAGSLiming Gao2016-11-161-5/+5
| | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=227 Refer to VS ASLPP_FLAGS, force include AutoGen.h so that ASL code can use FixedPcdGetXX to get FixedPcd value. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools tools_def.txt: Remove -P option in GCC ASLPP_FLAGSLiming Gao2016-11-161-2/+2
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=227 After -P option is removed, the generated preprocessed ASL file will have line markers. The extra information can be removed by Trim script. ASL code can refer to the definition in C source file. This has been supported in VS and XCODE tool chains. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: FILE DATA to support relative path under Multiple workspaceYonghong Zhu2016-11-151-1/+4
| | | | | | | | | | Fix the bug that FILE DATA to support relative path under Multiple workspace. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix the bug to support generate FFS by Align=AutoYonghong Zhu2016-11-151-1/+3
| | | | | | | | | | | FDF spec support to use 'Auto' as <FfsAlignmentValues>, but current Tool report error about -a=Auto is invalid option when we set Align=Auto for RAW File. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/Scripts: Add BinToPcd utilityMichael Kinney2016-11-141-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=228 Add a utility that converts a binary file into a VOID* PCD value or a full DSC file VOID* PCD statement with support for all the DSC supported PCD sections. usage: BinToPcd [-h] [--version] -i INPUTFILE [-o OUTPUTFILE] [-p PCDNAME] [-t {VPD,HII}] [-m MAXSIZE] [-f OFFSET] [-n VARIABLENAME] [-g VARIABLEGUID] [-v] [-q] [--debug [0-9]] Convert a binary file to a VOID* PCD value or DSC file VOID* PCD statement. Copyright (c) 2016, Intel Corporation. All rights reserved. optional arguments: -h, --help show this help message and exit --version show program's version number and exit -i INPUTFILE, --input INPUTFILE Input binary filename -o OUTPUTFILE, --output OUTPUTFILE Output filename for PCD value or PCD statement -p PCDNAME, --pcd PCDNAME Name of the PCD in the form <PcdTokenSpaceGuidCName>.<PcdCName> -t {VPD,HII}, --type {VPD,HII} PCD statement type (HII or VPD). Default is standard. -m MAXSIZE, --max-size MAXSIZE Maximum size of the PCD. Ignored with --type HII. -f OFFSET, --offset OFFSET VPD offset if --type is VPD. UEFI Variable offset if --type is HII. -n VARIABLENAME, --variable-name VARIABLENAME UEFI variable name. Only used with --type HII. -g VARIABLEGUID, --variable-guid VARIABLEGUID UEFI variable GUID C name. Only used with --type HII. -v, --verbose Increase output messages -q, --quiet Reduce output messages --debug [0-9] Set debug level This utility can be used in PCD value mode to convert a binary file into a string that can then be copied into the PCD value field of a VOID* PCD. The following is an example of PCD value mode on an 8 byte test.bin file. BinToPcd.py -i test.bin {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} The DSC file VOID* PCD statement mode can be used to generate a complete PCD statement for the PCD section types that a DSC file supports: [PcdsFixedAtBuild] [PcdsPatchableInModule] [PcdsDynamicDefault] [PcdsDynamicExDefault] [PcdsDynamicVpd] [PcdsDynamicExVpd] [PcdsDynamicHii] [PcdsDynamicExHii] The PCD statement mode is useful when combined with a !include statement in a DSC file. BinToPcd.py can be used to convert a binary file to a PCD statement in an output file, and that output file can be included into a DSC file in the matching PCD section to set the value of the PCD to the value from the binary file without having to copy the value into the DSC file. Updates can be made to the included file without editing the DSC file. Some example use cases are the setting the public key PCDs such as: gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer The following example converts a public key binary file to a [PcdsFixedAtBuild] compatible PCD statement: BinToPcd.py -i PublicKey.bin -o PublicKey.pcd --pcd gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBufferkenSpaceGuid The PublicKey.pcd output file contains a single line: gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer|{0x48, ...} A DSC file can be updated to include the PublicKey.pcd file: [PcdsFixedAtBuild] !include PublicKey.pcd Value examples =============== BinToPcd.py -i test.bin {0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} Normal examples: ================= BinToPcd.py -i test.bin -p Guid.Token Guid.Token|{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -m 20 Guid.Token|{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a}|VOID*|20 VPD examples: ============= BinToPcd.py -i test.bin -p Guid.Token -t VPD Guid.Name|*|8|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -t VPD -f 20 Guid.Name|20|8|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -t VPD -m 10 Guid.Name|*|10|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -t VPD -f 20 -m 10 Guid.Name|20|10|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} HII examples: ============= BinToPcd.py -i test.bin -p Guid.Token -t HII -g VarGuid -n VarName Guid.Name|L"VarName"|VarGuid|0|{0x48, 0x65, 0x6c, 0x6c} BinToPcd.py -i test.bin -p Guid.Token -t HII -g VarGuid -n VarName -f 8 Guid.Name|L"VarName"|VarGuid|8|{0x48, 0x65, 0x6c, 0x6c} Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/GenSec: Return correct status when input file size is 0Hao Wu2016-11-101-5/+11
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenFfs: Fix return too early when input file is of size 0Hao Wu2016-11-101-2/+9
| | | | | | | | | | | | | | | Commit 2cb874352423fcfd180199e6de8298567dff8e7f eliminates possible NULL pointer dereference in GenFfs tool source codes. However, it doesn't correctly handle the case when the input file is of size 0. This will lead to possible build issues. This commits refine the logic to handle the above case. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/PeCoffLib: Check 'RelocDir' before finding relocation blockHao Wu2016-11-091-16/+30
| | | | | | | | | | | To match the code logics in MdePkg/Library/BasePeCoffLib, add checks for 'RelocDir' before finding the relocation block. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VfrCompile/Pccts: Make assignment operator not returning voidHao Wu2016-11-082-4/+6
| | | | | | | | | | | | | | | | The assignment operators for class ANTLRTokenPtr return void in current code. This commit makes them return the reference to the object just like primitive types do. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VfrCompile/Pccts: Add virtual destructor for class DLGInputStreamHao Wu2016-11-081-0/+1
| | | | | | | | | | | | | | | | | Class DLGInputStream defined in DLexerBase.h has a virtual method but no virtual destructor. This commit add an empty virtual destructor to avoid potential memory/resource leak when an object of a class derived from class DLGInputStream is deleted through a pointer to the DLGInputStream class. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Add definitions for command format stringsHao Wu2016-11-082-8/+8
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VfrCompile: Explicitly state format string for DebugMsg()Hao Wu2016-11-081-2/+2
| | | | | | | | | | | | | For calls to API DebugMsg(), explicitly state format string as "%s" when the given variable list is a sting. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Provide string width in '%s' specifier in format stringHao Wu2016-11-081-1/+30
| | | | | | | | | | | | | | String width is not specified for '%s' specifier in the format string for scanf functions. This commit now specifies the string length for '%s' in format strings according to the size of receiving buffers. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenVtf: Provide string width in '%s' specifier in format stringHao Wu2016-11-081-2/+80
| | | | | | | | | | | | | | String width is not specified for '%s' specifier in the format string for scanf functions. This commit now specifies the string length for '%s' in format strings according to the size of receiving buffers. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Fix file handles not being closedHao Wu2016-11-081-0/+1
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/TianoCompress: Fix file handles not being closedHao Wu2016-11-081-3/+12
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/LzmaCompress: Fix file handles not being closedHao Wu2016-11-081-1/+3
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenVtf: Fix file handles not being closedHao Wu2016-11-081-0/+13
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenFv: Fix file handles not being closedHao Wu2016-11-081-0/+3
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenCrc32: Fix file handles not being closedHao Wu2016-11-081-1/+2
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenBootSector: Fix file handles not being closedHao Wu2016-11-081-12/+23
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/EfiRom: Fix file handles not being closedHao Wu2016-11-081-3/+4
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VolInfo: Fix potential memory leakHao Wu2016-11-081-1/+15
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VfrCompile: Fix potential memory leakHao Wu2016-11-081-0/+1
| | | | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/TianoCompress: Fix potential memory leakHao Wu2016-11-081-3/+3
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/Split: Fix potential memory and resource leakHao Wu2016-11-081-13/+28
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenVtf: Fix potential memory leakHao Wu2016-11-081-0/+4
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/GenSec: Fix potential memory leakHao Wu2016-11-081-4/+5
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>