public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Add check that FeatureFlag PCD must be BOOLEAN datum type
@ 2018-01-30  2:38 Yonghong Zhu
  0 siblings, 0 replies; only message in thread
From: Yonghong Zhu @ 2018-01-30  2:38 UTC (permalink / raw)
  To: edk2-devel

Per DEC spec we added check that the datum type of a FeatureFlag PCD
must be BOOLEAN.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/Workspace/DecBuildData.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py
index f6b908d..4676cee 100644
--- a/BaseTools/Source/Python/Workspace/DecBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DecBuildData.py
@@ -1,9 +1,9 @@
 ## @file
 # This file is used to create a database used by build tool
 #
-# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
 # (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
 # which accompanies this distribution.  The full text of the license may be found at
 # http://opensource.org/licenses/bsd-license.php
@@ -421,10 +421,12 @@ class DecBuildData(PackageBuildClassObject):
             Setting,LineNo = PcdDict[self._Arch, PcdCName, TokenSpaceGuid]
             if Setting == None:
                 continue
 
             DefaultValue, DatumType, TokenNumber = AnalyzePcdData(Setting)
+            if MODEL_PCD_FEATURE_FLAG == Type and DatumType != 'BOOLEAN':
+                EdkLogger.error('build', FORMAT_INVALID, "The datum type of a FeatureFlag PCD must be BOOLEAN.", File=self.MetaFile, Line=LineNo)
             validateranges, validlists, expressions = self._RawData.GetValidExpression(TokenSpaceGuid, PcdCName)
             PcdObj = PcdClassObject(
                                         PcdCName,
                                         TokenSpaceGuid,
                                         self._PCD_TYPE_STRING_[Type],
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-30  2:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30  2:38 [Patch] BaseTools: Add check that FeatureFlag PCD must be BOOLEAN datum type Yonghong Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox