version->version_major = VERSION_MAJOR;
version->version_minor = VERSION_MINOR;
version->version_patchlevel = VERSION_PATCHLEVEL;
+ strncpy(version->version_commit, FULL_VERSION, NAME_MAX);
strncpy(version->version_name, VERSION_NAME, NAME_MAX);
strncpy(version->package_url, PACKAGE_URL, NAME_MAX);
}
const char * const mi_lttng_element_version_web = "url";
const char * const mi_lttng_element_version_major = "major";
const char * const mi_lttng_element_version_minor = "minor";
+const char * const mi_lttng_element_version_commit = "commit";
const char * const mi_lttng_element_version_license = "license";
const char * const mi_lttng_element_version_patch_level = "patchLevel";
const char * const mi_lttng_element_version_description = "description";
goto end;
}
+ /* Commit version number */
+ ret = mi_lttng_writer_write_element_string(writer,
+ mi_lttng_element_version_commit, version->version_commit);
+ if (ret) {
+ goto end;
+ }
+
/* Patch number */
ret = mi_lttng_writer_write_element_unsigned_int(writer,
mi_lttng_element_version_patch_level, version->version_patchlevel);
uint32_t version_major; /* LTTng-Tools major version number */
uint32_t version_minor; /* LTTng-Tools minor version number */
uint32_t version_patchlevel; /* LTTng-Tools patchlevel version number */
+ char version_commit[NAME_MAX]; /* Commit hash of the current version */
char version_name[NAME_MAX];
char package_url[NAME_MAX]; /* Define to the home page for this package. */
};
const char * const mi_lttng_element_version_major;
const char * const mi_lttng_element_version_minor;
const char * const mi_lttng_element_version_license;
+const char * const mi_lttng_element_version_commit;
const char * const mi_lttng_element_version_patch_level;
const char * const mi_lttng_element_version_description;
<xs:element name="major" type="uint32_type" />
<xs:element name="url" type="xs:string" />
<xs:element name="minor" type="uint32_type" />
+ <xs:element name="commit" type="xs:string" />
<xs:element name="license" type="xs:string" />
<xs:element name="patchLevel" type="uint32_type" />
<xs:element name="description" type="xs:string" />