From: Mathieu Desnoyers Date: Thu, 2 Feb 2012 16:55:39 +0000 (-0500) Subject: Show error if kernel tracer version don't match X-Git-Tag: v2.0-pre19~3^2 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=61f82615b76321537fa605313b0057e22588f33c Show error if kernel tracer version don't match Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/kern-modules.h b/src/bin/lttng-sessiond/kern-modules.h index ff1684a15..e696ea3b7 100644 --- a/src/bin/lttng-sessiond/kern-modules.h +++ b/src/bin/lttng-sessiond/kern-modules.h @@ -21,9 +21,12 @@ /* * 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; diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 6eeb9b5b1..86a1957cf 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -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; }