From d3a215a2db134f967e8acf6d5c6958eb4422d515 Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato Date: Mon, 23 Mar 2020 13:42:19 +0000 Subject: [PATCH] new(userspace/falco): return also driver version from --version flag Signed-off-by: Leonardo Di Donato --- userspace/falco/config_falco.h.in | 3 ++- userspace/falco/falco.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/userspace/falco/config_falco.h.in b/userspace/falco/config_falco.h.in index 865ded79..065007ae 100644 --- a/userspace/falco/config_falco.h.in +++ b/userspace/falco/config_falco.h.in @@ -31,4 +31,5 @@ limitations under the License. #define FALCO_INSTALL_CONF_FILE "/etc/falco/falco.yaml" #define FALCO_SOURCE_LUA_DIR "${PROJECT_SOURCE_DIR}/userspace/falco/lua/" -#define PROBE_NAME "${PROBE_NAME}" +#define PROBE_NAME "@PROBE_NAME@" +#define DRIVER_VERSION "@PROBE_VERSION@" \ No newline at end of file diff --git a/userspace/falco/falco.cpp b/userspace/falco/falco.cpp index 22622568..6ff5faf6 100644 --- a/userspace/falco/falco.cpp +++ b/userspace/falco/falco.cpp @@ -624,6 +624,7 @@ int falco_init(int argc, char **argv) if(string(long_options[long_index].name) == "version") { printf("Falco version: %s\n", FALCO_VERSION); + printf("Driver version: %s\n", DRIVER_VERSION); return EXIT_SUCCESS; } else if (string(long_options[long_index].name) == "cri")