Show error if kernel tracer version don't match
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Feb 2012 16:55:39 +0000 (11:55 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Feb 2012 16:55:39 +0000 (11:55 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/kern-modules.h
src/bin/lttng-sessiond/kernel.c

index ff1684a15e814befb221b8762a376bc1716e0f76..e696ea3b706d498354be7a922c0373cc539923b8 100644 (file)
 /*
  * Compatible lttng-modules version.
  */
-#define KERN_MODULES_VERSION       0
-#define KERN_MODULES_PATCHLEVEL    9
-#define KERN_MODULES_SUBLEVEL      1
+#define KERN_MODULES_PRE_VERSION       1
+#define KERN_MODULES_PRE_PATCHLEVEL    9
+
+#define KERN_MODULES_VERSION       2
+#define KERN_MODULES_PATCHLEVEL    0
+#define KERN_MODULES_SUBLEVEL      0
 
 struct kern_modules_param {
        const char *name;
index 6eeb9b5b1b7824802bb2da554999ca2a46e26bce..86a1957cf400a2f8c6cd080ff42c28a864dda427 100644 (file)
@@ -623,7 +623,8 @@ int kernel_validate_version(int tracer_fd)
        }
 
        /* Validate version */
-       if (version.version > KERN_MODULES_VERSION) {
+       if (version.version != KERN_MODULES_PRE_VERSION
+               && version.version != KERN_MODULES_VERSION) {
                goto error_version;
        }
 
This page took 0.036193 seconds and 4 git commands to generate.