BaseTool/UPT: Add supporting of decimal numbers for INF_VERSION and DEC_SPECIFICATION

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18868 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Hess Chen
2015-11-18 05:38:35 +00:00
committed by hchen30
parent b9335cf562
commit 48b77f5ea9
3 changed files with 15 additions and 8 deletions

View File

@ -340,16 +340,21 @@ class InfDefSection(InfDefSectionOptionRomInfo):
ErrorInInf(ST.ERR_INF_PARSER_NOT_SUPPORT_EDKI_INF,
ErrorCode=ToolError.EDK1_INF_ERROR,
LineInfo=self.CurrentLine)
self.InfVersion = InfDefMember()
self.InfVersion.SetValue(InfVersion)
self.InfVersion.Comments = Comments
return True
elif IsValidDecVersionVal(InfVersion):
if (InfVersion < 65541):
ErrorInInf(ST.ERR_INF_PARSER_NOT_SUPPORT_EDKI_INF,
ErrorCode=ToolError.EDK1_INF_ERROR,
LineInfo=self.CurrentLine)
else:
ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(InfVersion),
LineInfo=self.CurrentLine)
return False
self.InfVersion = InfDefMember()
self.InfVersion.SetValue(InfVersion)
self.InfVersion.Comments = Comments
return True
## GetInfVersion
#
def GetInfVersion(self):
@ -1000,4 +1005,4 @@ class InfDefObject(InfSectionCommonDef):
def GetDefines(self):
return self.Defines