Add ovni_version_get() function

Allows the reding the version of the libovni.so currently loaded.
This commit is contained in:
Rodrigo Arias 2023-07-26 13:30:40 +02:00
parent 7e96c0cb2a
commit 97c936d41f
3 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Add `ovni_version_get()` function.
## [1.2.2] - 2022-07-26
### Added

View File

@ -129,6 +129,7 @@ struct ovni_rproc {
#define ovni_version_check() ovni_version_check_str(OVNI_LIB_VERSION)
void ovni_version_check_str(const char *version);
const char *ovni_version_get(void);
void ovni_proc_init(int app, const char *loom, int pid);

View File

@ -23,6 +23,12 @@ struct ovni_rproc rproc = {0};
/* Data per thread */
_Thread_local struct ovni_rthread rthread = {0};
const char *
ovni_version_get(void)
{
return OVNI_LIB_VERSION;
}
void ovni_version_check_str(const char *version)
{
if (version == NULL)