Add DATUM_TYPE checking for FEATURE_FLAG PCD entry. For FEATURE_FLAG PCD, the datum type should only be boolean type.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@559 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2006-06-19 08:33:18 +00:00
parent a37097de83
commit bab72a575b

View File

@ -1533,6 +1533,15 @@ public class CollectPCDAction {
datum = pcdBuildData.getValue();
maxDatumSize = pcdBuildData.getMaxDatumSize();
if ((pcdType == Token.PCD_TYPE.FEATURE_FLAG) &&
(datumType != Token.DATUM_TYPE.BOOLEAN)){
exceptionString = String.format("[FPD file error] For PCD %s in module %s, the PCD type is FEATRUE_FLAG but "+
"datum type of this PCD entry is not BOOLEAN!",
pcdBuildData.getCName(),
moduleName);
throw new EntityException(exceptionString);
}
//
// Check <TokenSpaceGuid> is exist? In future, because all schema verification will tools
// will check that, following checking code could be removed.