From: Mathieu Desnoyers Date: Mon, 20 Feb 2012 19:59:42 +0000 (-0500) Subject: Standardize version across toolchain X-Git-Tag: v2.0.0-rc1~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c6c9e10f104b1ff039c3f76c5accdc12513c760d;p=lttng-modules.git Standardize version across toolchain Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-abi.c b/lttng-abi.c index 98f03c3e..7fa303a9 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -135,9 +135,9 @@ long lttng_abi_tracer_version(struct file *file, { struct lttng_kernel_tracer_version v; - v.version = LTTNG_VERSION; - v.patchlevel = LTTNG_PATCHLEVEL; - v.sublevel = LTTNG_SUBLEVEL; + v.major = LTTNG_MODULES_MAJOR_VERSION; + v.minor = LTTNG_MODULES_MINOR_VERSION; + v.patchlevel = LTTNG_MODULES_PATCHLEVEL_VERSION; if (copy_to_user(uversion_param, &v, sizeof(v))) return -EFAULT; diff --git a/lttng-abi.h b/lttng-abi.h index fecf0ad1..48f76f20 100644 --- a/lttng-abi.h +++ b/lttng-abi.h @@ -87,9 +87,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 { diff --git a/lttng-events.c b/lttng-events.c index a3758229..a0620446 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -932,8 +932,8 @@ int _lttng_session_metadata_statedump(struct lttng_session *session) lttng_alignof(uint16_t) * CHAR_BIT, lttng_alignof(uint32_t) * CHAR_BIT, lttng_alignof(uint64_t) * CHAR_BIT, - CTF_VERSION_MAJOR, - CTF_VERSION_MINOR, + CTF_SPEC_MAJOR, + CTF_SPEC_MINOR, uuid_s, #ifdef __BIG_ENDIAN "be" @@ -946,15 +946,21 @@ int _lttng_session_metadata_statedump(struct lttng_session *session) ret = lttng_metadata_printf(session, "env {\n" - " domain = \"%s\";\n" + " domain = \"kernel\";\n" " sysname = \"%s\";\n" - " release = \"%s\";\n" - " version = \"%s\";\n" + " kernel_release = \"%s\";\n" + " kernel_version = \"%s\";\n" + " tracer_name = \"lttng-modules\";\n" + " tracer_major = %d;\n" + " tracer_minor = %d;\n" + " tracer_patchlevel = %d;\n" "};\n\n", - "kernel", utsname()->sysname, utsname()->release, - utsname()->version + utsname()->version, + LTTNG_MODULES_MAJOR_VERSION, + LTTNG_MODULES_MINOR_VERSION, + LTTNG_MODULES_PATCHLEVEL_VERSION ); if (ret) goto end; diff --git a/lttng-tracer.h b/lttng-tracer.h index 99c8f087..cafd8d24 100644 --- a/lttng-tracer.h +++ b/lttng-tracer.h @@ -25,9 +25,9 @@ #include "lttng-tracer-core.h" #include "lttng-events.h" -#define LTTNG_VERSION 1 -#define LTTNG_PATCHLEVEL 9 -#define LTTNG_SUBLEVEL 9 +#define LTTNG_MODULES_MAJOR_VERSION 2 +#define LTTNG_MODULES_MINOR_VERSION 0 +#define LTTNG_MODULES_PATCHLEVEL_VERSION 0 #ifndef CHAR_BIT #define CHAR_BIT 8 @@ -51,10 +51,6 @@ #define CTF_SPEC_MAJOR 1 #define CTF_SPEC_MINOR 8 -/* Tracer major/minor versions */ -#define CTF_VERSION_MAJOR 0 -#define CTF_VERSION_MINOR 1 - /* * Number of milliseconds to retry before failing metadata writes on buffer full * condition. (10 seconds)