From: klu2 Date: Mon, 19 Jun 2006 08:33:18 +0000 (+0000) Subject: Add DATUM_TYPE checking for FEATURE_FLAG PCD entry. For FEATURE_FLAG PCD, the datum... X-Git-Tag: edk2-stable201903~25225 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=bab72a575b06bfc7679389b45e3424053ac0f3ac 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 --- 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 is exist? In future, because all schema verification will tools // will check that, following checking code could be removed.