summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/Misc.py
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2019-01-11 02:39:46 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-01-21 18:03:32 +0800
commit12ba816e61a8dc400b10433a6548e52d62e2cba8 (patch)
tree5777f3d956e6a2e1d9e22fed57ee7e91de1d7ed5 /BaseTools/Source/Python/Common/Misc.py
parent5f7650e49727526f402a6d89fb0780b847bb475f (diff)
downloadedk2-12ba816e61a8dc400b10433a6548e52d62e2cba8.tar.gz
edk2-12ba816e61a8dc400b10433a6548e52d62e2cba8.tar.bz2
edk2-12ba816e61a8dc400b10433a6548e52d62e2cba8.zip
BaseTools/Workspace/InfBuildData: move functions
Move ProtocolValue and PpiValue from Common.Misc to this file. There were no other consumers of these 2 functions. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/Misc.py')
-rw-r--r--BaseTools/Source/Python/Common/Misc.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 32de5d9100..ae66afd26f 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -611,44 +611,6 @@ def GuidValue(CName, PackageList, Inffile = None):
return P.Guids[CName]
return None
-## Get Protocol value from given packages
-#
-# @param CName The CName of the GUID
-# @param PackageList List of packages looking-up in
-# @param Inffile The driver file
-#
-# @retval GuidValue if the CName is found in any given package
-# @retval None if the CName is not found in all given packages
-#
-def ProtocolValue(CName, PackageList, Inffile = None):
- for P in PackageList:
- ProtocolKeys = P.Protocols.keys()
- if Inffile and P._PrivateProtocols:
- if not Inffile.startswith(P.MetaFile.Dir):
- ProtocolKeys = [x for x in P.Protocols if x not in P._PrivateProtocols]
- if CName in ProtocolKeys:
- return P.Protocols[CName]
- return None
-
-## Get PPI value from given packages
-#
-# @param CName The CName of the GUID
-# @param PackageList List of packages looking-up in
-# @param Inffile The driver file
-#
-# @retval GuidValue if the CName is found in any given package
-# @retval None if the CName is not found in all given packages
-#
-def PpiValue(CName, PackageList, Inffile = None):
- for P in PackageList:
- PpiKeys = P.Ppis.keys()
- if Inffile and P._PrivatePpis:
- if not Inffile.startswith(P.MetaFile.Dir):
- PpiKeys = [x for x in P.Ppis if x not in P._PrivatePpis]
- if CName in PpiKeys:
- return P.Ppis[CName]
- return None
-
## A string template class
#
# This class implements a template for string replacement. A string template