summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-01-24 17:49:06 +0000
committerRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-01-24 17:49:06 +0000
commit2d9c184c9d3b28efdfdbd0c827d6b1fda0d507a7 (patch)
treea5599ebfb95cab01037ac2d7739bc4e2ee81c9a2 /classes/base.bbclass
parentf68ff6a19d85b3f7dd8f2cfd72840e340fa0b328 (diff)
kernel: add wifi suspend fix to kernel-module-(hostap|orinoco)-cs. Closes 3664.
* applies only to kernel later than 2.6.17 * added base_version_less_or_equal function to base.bbclass (thanks, zecke and mickey!) to do the comparison. This does not change existing functionality. Skipped RFC.
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index d48d2a5726..c8ee75627f 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -128,6 +128,14 @@ def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
else:
return falsevalue
+def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
+ import bb
+ result = bb.vercmp(bb.data.getVar(variable,d,True), checkvalue)
+ if result <= 0:
+ return truevalue
+ else:
+ return falsevalue
+
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
import bb
matches = 0