From: Mathieu Desnoyers Date: Mon, 20 Feb 2012 19:53:20 +0000 (-0500) Subject: Standardize lttng-modules header version X-Git-Tag: v2.0.0-rc1~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a62a65563c1e7cea740c5f8caf7d425174e2afbe;p=lttng-tools.git Standardize lttng-modules header version refs #79 Signed-off-by: David Goulet Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/kern-modules.h b/src/bin/lttng-sessiond/kern-modules.h index e696ea3b7..5c4d5dd58 100644 --- a/src/bin/lttng-sessiond/kern-modules.h +++ b/src/bin/lttng-sessiond/kern-modules.h @@ -21,12 +21,11 @@ /* * Compatible lttng-modules version. */ -#define KERN_MODULES_PRE_VERSION 1 -#define KERN_MODULES_PRE_PATCHLEVEL 9 +#define KERN_MODULES_PRE_MAJOR 1 +#define KERN_MODULES_PRE_MINOR 9 -#define KERN_MODULES_VERSION 2 -#define KERN_MODULES_PATCHLEVEL 0 -#define KERN_MODULES_SUBLEVEL 0 +#define KERN_MODULES_MAJOR 2 +#define KERN_MODULES_MINOR 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 dfc0be958..8e960dfed 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -622,17 +622,17 @@ int kernel_validate_version(int tracer_fd) } /* Validate version */ - if (version.version != KERN_MODULES_PRE_VERSION - && version.version != KERN_MODULES_VERSION) { + if (version.major != KERN_MODULES_PRE_MAJOR + && version.major != KERN_MODULES_MAJOR) { goto error_version; } - DBG2("Kernel tracer version validated (major version %d)", version.version); + DBG2("Kernel tracer version validated (major version %d)", version.major); return 0; error_version: ERR("Kernel major version %d is not compatible (supporting <= %d)", - version.version, KERN_MODULES_VERSION) + version.major, KERN_MODULES_MAJOR) ret = -1; error: diff --git a/src/common/lttng-kernel.h b/src/common/lttng-kernel.h index e1d99ceee..05303a5e0 100644 --- a/src/common/lttng-kernel.h +++ b/src/common/lttng-kernel.h @@ -113,9 +113,9 @@ struct lttng_kernel_event { }; struct lttng_kernel_tracer_version { - uint32_t version; + uint32_t major; + uint32_t minor; uint32_t patchlevel; - uint32_t sublevel; }; enum lttng_kernel_calibrate_type {