AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
# ------------------------------------------------------------------------------
+journald_kmsg=no
+AC_ARG_ENABLE(journald-kmsg, AS_HELP_STRING([--disable-journald-kmsg], [Disable journald kmsg]),
+ [case "${enableval}" in
+ yes) journald-kmsg=yes ;;
+ no) journald-kmsg=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-journald-kmsg) ;;
+ esac],
+ [journald_kmsg=no])
+
+if test "x${journald_kmsg}" != xno; then
+ AC_DEFINE(TIZEN_JOURNALD_KMSG, 1, [Define if journald kmsg is on])
+fi
+
+# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hibernate,
[AC_HELP_STRING([--disable-hibernate], [disable hibernation support])],
enable_hibernate=$enableval, enable_hibernate=yes)
/* TODO workaround code */
if (UNIT(s)->cgroup_realized) {
- _cleanup_free_ char *path = NULL;
- path = unit_default_cgroup_path(UNIT(s));
+ _cleanup_free_ char *path_temp = NULL;
+ path_temp = unit_default_cgroup_path(UNIT(s));
- if (cg_check_cgroup_exist(path) < 0) {
+ if (cg_check_cgroup_exist(path_temp) < 0) {
log_unit_error(UNIT(s)->id, "CGROUP ERROR! (%s) is already realized but not exists", UNIT(s)->id);
UNIT(s)->cgroup_realized = false;
UNIT(s)->cgroup_realized_mask = 0;
return 0;
}
+#ifdef TIZEN_JOURNALD_KMSG
static int dispatch_dev_kmsg(sd_event_source *es, int fd, uint32_t revents, void *userdata) {
Server *s = userdata;
return server_read_dev_kmsg(s);
}
+#endif
int server_open_dev_kmsg(Server *s) {
- int r;
assert(s);
}
// Requested by Profiling Part & PM Part - DISABLE KMSG online handling from journald
-// Plz, ask them about "why?"
-#if 0
- r = sd_event_add_io(s->event, &s->dev_kmsg_event_source, s->dev_kmsg_fd, EPOLLIN, dispatch_dev_kmsg, s);
+#ifdef TIZEN_JOURNALD_KMSG
+ int r = sd_event_add_io(s->event, &s->dev_kmsg_event_source, s->dev_kmsg_fd, EPOLLIN, dispatch_dev_kmsg, s);
if (r < 0) {
/* This will fail with EPERM on older kernels where
return 0;
+#ifdef TIZEN_JOURNALD_KMSG
fail:
s->dev_kmsg_event_source = sd_event_source_unref(s->dev_kmsg_event_source);
s->dev_kmsg_fd = safe_close(s->dev_kmsg_fd);
return r;
+#endif
}
int server_open_kernel_seqnum(Server *s) {
void dot_dump_unique_name(sd_bus *bus, char *name, Hashmap *hashmap_wkn, FILE *f, sd_bus_message *m) {
int r;
bool update = false;
- int obtained;
- char *uname;
- char *contents = NULL;
+ char *obtained;
+ const char *uname;
+ const char *contents = NULL;
char type;
union {
uint8_t u8;
}
}
- int x, y;
-
if (!f)
f = stdout;