summaryrefslogtreecommitdiff
path: root/Tools/Source
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-19 08:33:18 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-19 08:33:18 +0000
commitbab72a575b06bfc7679389b45e3424053ac0f3ac (patch)
tree9b6fb9b7289d5658b508e6f53be3b90387842aa6 /Tools/Source
parenta37097de83bde82215194b684999983667d1ed9e (diff)
downloadedk2-platforms-bab72a575b06bfc7679389b45e3424053ac0f3ac.tar.xz
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
Diffstat (limited to 'Tools/Source')
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
index 1dbcb2306a..92f320bc35 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
@@ -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.