summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/classes/obmc-phosphor-utils.bbclass
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2015-09-15 14:42:19 -0500
committerPatrick Williams <patrick@stwcx.xyz>2015-09-15 14:42:19 -0500
commit885cdf3f44f8a7a4f1972cb3adc18b1e80d606ce (patch)
tree42739d34a6a62ba6d15bb48c9f384b55ac35b18a /meta-phosphor/classes/obmc-phosphor-utils.bbclass
parent21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 (diff)
parent93fb535853a24d4c3c42ec425ac92c9d3de13294 (diff)
downloadtalos-openbmc-885cdf3f44f8a7a4f1972cb3adc18b1e80d606ce.tar.gz
talos-openbmc-885cdf3f44f8a7a4f1972cb3adc18b1e80d606ce.zip
Add 'meta-phosphor/' from commit '93fb535853a24d4c3c42ec425ac92c9d3de13294'
git-subtree-dir: meta-phosphor git-subtree-mainline: 21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 git-subtree-split: 93fb535853a24d4c3c42ec425ac92c9d3de13294
Diffstat (limited to 'meta-phosphor/classes/obmc-phosphor-utils.bbclass')
-rw-r--r--meta-phosphor/classes/obmc-phosphor-utils.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-utils.bbclass b/meta-phosphor/classes/obmc-phosphor-utils.bbclass
new file mode 100644
index 000000000..4f556294b
--- /dev/null
+++ b/meta-phosphor/classes/obmc-phosphor-utils.bbclass
@@ -0,0 +1,14 @@
+# Helper functions for checking feature variables.
+
+inherit utils
+
+def df_enabled(feature, value, d):
+ return base_contains("DISTRO_FEATURES", feature, value, "", d)
+
+def mf_enabled(feature, value, d):
+ return base_contains("MACHINE_FEATURES", feature, value, "", d)
+
+def cf_enabled(feature, value, d):
+ return value if df_enabled(feature, value, d) \
+ and mf_enabled(feature, value, d) \
+ else ""
OpenPOWER on IntegriCloud