Commit 403385f5 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/wrs_watchdog: add printing version at startup when daemon

Print version at startup when daemon and together with help.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 774e061c
...@@ -278,6 +278,8 @@ void endless_watchdog(void) ...@@ -278,6 +278,8 @@ void endless_watchdog(void)
void print_help(char *prgname) void print_help(char *prgname)
{ {
printf("wrs_watchdog. Commit %s, built on " __DATE__ "\n",
__GIT_VER__);
printf("usage: %s <options>\n", prgname); printf("usage: %s <options>\n", prgname);
printf(" -d Run as daemon in the background\n" printf(" -d Run as daemon in the background\n"
" -l List FSMs state for all ports\n" " -l List FSMs state for all ports\n"
...@@ -343,6 +345,8 @@ int main(int argc, char *argv[]) ...@@ -343,6 +345,8 @@ int main(int argc, char *argv[])
} }
if (daemon_mode) { if (daemon_mode) {
wrs_msg(LOG_ALERT, "wrs_watchdog. Commit %s, built on "
__DATE__ "\n", __GIT_VER__);
daemonize(pidfile); daemonize(pidfile);
pr_info("Demonize\n"); pr_info("Demonize\n");
endless_watchdog(); endless_watchdog();
......
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