Add ovni_version_get() function
Allows the reding the version of the libovni.so currently loaded.
This commit is contained in:
		
							parent
							
								
									7e96c0cb2a
								
							
						
					
					
						commit
						97c936d41f
					
				| @ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||||||
| 
 | 
 | ||||||
| ## [Unreleased] | ## [Unreleased] | ||||||
| 
 | 
 | ||||||
|  | ### Added | ||||||
|  | 
 | ||||||
|  | - Add `ovni_version_get()` function. | ||||||
|  | 
 | ||||||
| ## [1.2.2] - 2022-07-26 | ## [1.2.2] - 2022-07-26 | ||||||
| 
 | 
 | ||||||
| ### Added | ### Added | ||||||
|  | |||||||
| @ -129,6 +129,7 @@ struct ovni_rproc { | |||||||
| 
 | 
 | ||||||
| #define ovni_version_check() ovni_version_check_str(OVNI_LIB_VERSION) | #define ovni_version_check() ovni_version_check_str(OVNI_LIB_VERSION) | ||||||
| void ovni_version_check_str(const char *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); | void ovni_proc_init(int app, const char *loom, int pid); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -23,6 +23,12 @@ struct ovni_rproc rproc = {0}; | |||||||
| /* Data per thread */ | /* Data per thread */ | ||||||
| _Thread_local struct ovni_rthread rthread = {0}; | _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) | void ovni_version_check_str(const char *version) | ||||||
| { | { | ||||||
| 	if (version == NULL) | 	if (version == NULL) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user