mirror of https://github.com/acidanthera/audk.git
BaseTools: Add check for INF statement must be a .inf file
Per FDF spec, INF statement must use a .inf file, we add this error check. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
ffcec664ca
commit
a87e79d9d6
|
@ -1,7 +1,7 @@
|
|||
## @file
|
||||
# parse FDF file
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
|
@ -2486,6 +2486,8 @@ class FdfParser:
|
|||
if not self.__GetNextToken():
|
||||
raise Warning("expected INF file path", self.FileName, self.CurrentLineNumber)
|
||||
ffsInf.InfFileName = self.__Token
|
||||
if not ffsInf.InfFileName.endswith('.inf'):
|
||||
raise Warning("expected .inf file path", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
ffsInf.CurrentLineNum = self.CurrentLineNumber
|
||||
ffsInf.CurrentLineContent = self.__CurrentLine()
|
||||
|
|
Loading…
Reference in New Issue