Make upper bound of kernel version checking macro exclusive
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>
Tue, 27 Nov 2012 16:43:38 +0000 (17:43 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Nov 2012 16:43:38 +0000 (17:43 +0100)
It's more usable to have the upper limit exclusive. It helps to avoid
hardcoding of stable branch highest version number, i.e. having a range
from 3.1.0 up to 3.2.0 (exclusively) gives us all 3.1.x versions.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-kernel-version.h

index 280a398a93e370db16f95b416802fb0ef0946213..0eb56b3820d256bcce5ef399552f95d2ea398e08 100644 (file)
 
 /*
  * This macro checks if the kernel version is between the two specified
- * versions (inclusive).
+ * versions (lower limit inclusive, upper limit exclusive).
  */
 #define LTTNG_KERNEL_RANGE(a_low, b_low, c_low, a_high, b_high, c_high) \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(a_low, b_low, c_low) && \
-        LINUX_VERSION_CODE <= KERNEL_VERSION(a_high, b_high, c_high))
+        LINUX_VERSION_CODE < KERNEL_VERSION(a_high, b_high, c_high))
 
 #endif /* _LTTNG_KERNEL_VERSION_H */
This page took 0.026684 seconds and 4 git commands to generate.