|
From: <yi...@us...> - 2011-11-17 08:33:05
|
Revision: 2414
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2414&view=rev
Author: yingke
Date: 2011-11-17 08:32:56 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Check if FD or FV name exist when FD or FV statement are in capsule section.
Signed-off-by: yingke
Reviewed-by: jsu1
Reviewed-by: gikidy
Modified Paths:
--------------
trunk/BaseTools/Source/Python/GenFds/FdfParser.py
Modified: trunk/BaseTools/Source/Python/GenFds/FdfParser.py
===================================================================
--- trunk/BaseTools/Source/Python/GenFds/FdfParser.py 2011-11-17 08:32:46 UTC (rev 2413)
+++ trunk/BaseTools/Source/Python/GenFds/FdfParser.py 2011-11-17 08:32:56 UTC (rev 2414)
@@ -2953,6 +2953,9 @@
if not self.__GetNextToken():
raise Warning("expected FV name", self.FileName, self.CurrentLineNumber)
+ if self.__Token.upper() not in self.Profile.FvDict.keys():
+ raise Warning("FV name does not exist", self.FileName, self.CurrentLineNumber)
+
CapsuleFv = CapsuleData.CapsuleFv()
CapsuleFv.FvName = self.__Token
CapsuleObj.CapsuleDataList.append(CapsuleFv)
@@ -2978,6 +2981,9 @@
if not self.__GetNextToken():
raise Warning("expected FD name", self.FileName, self.CurrentLineNumber)
+ if self.__Token.upper() not in self.Profile.FdDict.keys():
+ raise Warning("FD name does not exist", self.FileName, self.CurrentLineNumber)
+
CapsuleFd = CapsuleData.CapsuleFd()
CapsuleFd.FdName = self.__Token
CapsuleObj.CapsuleDataList.append(CapsuleFd)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|