Commit 3e6fb758 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/wrsw_hal: Print version at startup

It is good to have in logs when and what version of hal started.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 118f4b98
......@@ -22,6 +22,9 @@ CFLAGS = -O -g -Wall \
-I../mini-rpc \
-I$(LINUX)/arch/arm/mach-at91/include
GIT_VER = $(shell git describe --always --dirty | sed 's;^wr-switch-sw-;;')
CFLAGS += -D__GIT_VER__="\"${GIT_VER}\""
LDFLAGS = -L../libwr -L../mini-rpc \
-lm -ldl -lwr -lminipc
......
......@@ -190,6 +190,10 @@ int main(int argc, char *argv[])
wrs_msg_init(argc, argv);
/* Print HAL's version */
wrs_msg(LOG_ALERT, "wrsw_hal. Commit %s, built on " __DATE__ "\n",
__GIT_VER__);
/* Prevent from running HAL twice - it will likely freeze the system */
if (hal_check_running()) {
fprintf(stderr, "Fatal: There is another WR HAL "
......
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