This journal message should show up on a 'systemctl status' for the
service, aiding in debug by clearly identifying the running version.
Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
# PkgConfig tests
PKG_CHECK_MODULES([glib], [glib-2.0 gthread-2.0])
PKG_CHECK_MODULES([curl], [libcurl])
+PKG_CHECK_MODULES([systemd_journal], [libsystemd-journal])
# Checks for header files.
AC_CHECK_HEADERS([stdio.h assert.h sys/types.h sys/stat.h dirent.h signal.h errno.h sched.h fcntl.h stdlib.h string.h sys/time.h syslog.h unistd.h asm/unistd.h])
corewatcher.h
AM_CPPFLAGS = $(AM_CFLAGS) $(glib_CFLAGS) ${curl_CFLAGS}
-corewatcher_LDADD = $(glib_LIBS) ${curl_LIBS}
+corewatcher_LDADD = $(glib_LIBS) ${curl_LIBS} ${systemd_journal_LIBS}
#include <errno.h>
#include <glib.h>
-
+#include <systemd/sd-journal.h>
/* see linux kernel doc Documentation/block/ioprio.txt */
#define IOPRIO_WHO_PROCESS 1
return EXIT_SUCCESS;
}
+ sd_journal_print(LOG_INFO, "Nitra corewatcher %s", VERSION);
+
inotify_thread = g_thread_new("corewatcher inotify", inotify_loop, NULL);
if (inotify_thread == NULL)
fprintf(stderr, "+ Unable to start inotify thread\n");
* Tim Pepper <timothy.c.pepper@linux.intel.com>
*/
+#include "config.h"
#ifndef __INCLUDE_GUARD_KERNELOOPS_H_
#define __INCLUDE_GUARD_KERNELOOPS_H_