diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:42:19 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:42:19 -0500 |
commit | 885cdf3f44f8a7a4f1972cb3adc18b1e80d606ce (patch) | |
tree | 42739d34a6a62ba6d15bb48c9f384b55ac35b18a /meta-phosphor/classes/obmc-phosphor-utils.bbclass | |
parent | 21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 (diff) | |
parent | 93fb535853a24d4c3c42ec425ac92c9d3de13294 (diff) | |
download | talos-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.bbclass | 14 |
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 "" |