From: David Goulet Date: Mon, 23 Jan 2012 18:31:16 +0000 (-0500) Subject: Fix kernel version to only test major version X-Git-Tag: v2.0-pre18~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5df0f285b2f2f9903e13cf6e48046d13a6c4c727;p=lttng-tools.git Fix kernel version to only test major version Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 3b0d6e5f5..d9e047fc3 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -625,27 +625,14 @@ int kernel_validate_version(int tracer_fd) /* Validate version */ if (version.version > KERN_MODULES_VERSION) { goto error_version; - } else { - if (version.patchlevel > KERN_MODULES_PATCHLEVEL) { - goto error_version; - } - else { - if (version.sublevel > KERN_MODULES_SUBLEVEL) { - goto error_version; - } - } } - DBG2("Kernel tracer version validated (%d.%d.%d)", version.version, - version.patchlevel, version.sublevel); - + DBG2("Kernel tracer version validated (major version %d)", version.version); return 0; error_version: - ERR("Kernel version is not compatible %d.%d.%d (supporting <= %d.%d.%d)", - version.version, version.patchlevel, version.sublevel, - KERN_MODULES_VERSION, KERN_MODULES_PATCHLEVEL, - KERN_MODULES_SUBLEVEL); + ERR("Kernel major version %d is not compatible (supporting <= %d)", + version.version, KERN_MODULES_VERSION) ret = -1; error: