mirror of https://github.com/acidanthera/audk.git
BaseTools: add error check for "#image" for idf file format
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>
This commit is contained in:
parent
d9077743b6
commit
31bf6304ba
|
@ -94,9 +94,12 @@ class IdfFileClassObject(object):
|
|||
if len(Line) == 0:
|
||||
continue
|
||||
|
||||
LineNo = GetLineNo(FileIn, Line, False)
|
||||
if not Line.startswith('#image '):
|
||||
EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'The %s in Line %s of File %s is invalid.' % (Line, LineNo, File.Path))
|
||||
|
||||
if Line.find('#image ') >= 0:
|
||||
LineDetails = Line.split()
|
||||
LineNo = GetLineNo(FileIn, Line, False)
|
||||
Len = len(LineDetails)
|
||||
if Len != 3 and Len != 4:
|
||||
EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'The format is not match #image IMAGE_ID [TRANSPARENT] ImageFileName in Line %s of File %s.' % (LineNo, File.Path))
|
||||
|
|
Loading…
Reference in New Issue