Commit 154e5771 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

lib, eshi: add evl_get_version()

Returns version information about the running EVL interface including
the API and kernel ABI levels. A negative ABI level denotes the EVL
shim layer (eshi).
parent cba6a995
......@@ -43,3 +43,11 @@ bool eshi_is_initialized(void)
{
return init_status == 0;
}
struct evl_version evl_get_version(void)
{
return (struct evl_version){
.api_level = __EVL__,
.abi_level = -1,
};
}
......@@ -9,7 +9,12 @@
#include <evl/syscall.h>
#define __EVL__ 5 /* API revision */
#define __EVL__ 6 /* API version */
struct evl_version {
int api_level; /* libevl.so: __EVL__ */
int abi_level; /* core: EVL_ABI_LEVEL, -1 for ESHI */
};
#ifdef __cplusplus
extern "C" {
......@@ -17,6 +22,8 @@ extern "C" {
int evl_init(void);
struct evl_version evl_get_version(void);
#ifdef __cplusplus
}
#endif
......
......@@ -20,7 +20,12 @@
#include <evl/poll.h>
#include <evl/proxy.h>
#define __EVL__ 6 /* API revision */
#define __EVL__ 7 /* API version */
struct evl_version {
int api_level; /* libevl.so: __EVL__ */
int abi_level; /* core: EVL_ABI_LEVEL, -1 for ESHI */
};
#ifdef __cplusplus
extern "C" {
......@@ -36,6 +41,8 @@ unsigned int evl_detect_fpu(void);
extern const char *libevl_version_string;
struct evl_version evl_get_version(void);
#ifdef __cplusplus
}
#endif
......
......@@ -251,3 +251,11 @@ unsigned int evl_detect_fpu(void)
return core_info.fpu_features;
}
struct evl_version evl_get_version(void)
{
return (struct evl_version){
.api_level = __EVL__,
.abi_level = EVL_ABI_LEVEL,
};
}
......@@ -42,7 +42,7 @@ static void usage(void)
{
fprintf(stderr, "usage: evl [options] <command> [<args>]\n");
fprintf(stderr, "-P --prefix=<path> set command path prefix\n");
fprintf(stderr, "-V --version print version and required ABI revision\n");
fprintf(stderr, "-V --version print library and required ABI versions\n");
}
#define short_optlist "+P:V"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment