diff options
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | src/core/service.c | 6 | ||||
-rw-r--r-- | src/journal/journald-kmsg.c | 10 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-dump.c | 8 | ||||
-rw-r--r-- | src/libsystemd/sd-login/sd-login.c | 14 |
5 files changed, 33 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 68b6dd31e0..6927e5dda5 100644 --- a/configure.ac +++ b/configure.ac @@ -1383,6 +1383,20 @@ AS_IF([test "x$enable_manpages" != xno], [ 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) diff --git a/src/core/service.c b/src/core/service.c index 5df2ffab67..d422cb2a03 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1189,10 +1189,10 @@ static int service_spawn( /* 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; diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c index e62c32be12..a2b6a15cad 100644 --- a/src/journal/journald-kmsg.c +++ b/src/journal/journald-kmsg.c @@ -379,6 +379,7 @@ int server_flush_dev_kmsg(Server *s) { 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; @@ -394,9 +395,9 @@ static int dispatch_dev_kmsg(sd_event_source *es, int fd, uint32_t revents, void return server_read_dev_kmsg(s); } +#endif int server_open_dev_kmsg(Server *s) { - int r; assert(s); @@ -408,9 +409,8 @@ int server_open_dev_kmsg(Server *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 @@ -435,11 +435,13 @@ int server_open_dev_kmsg(Server *s) { 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) { diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c index 874f82bafc..f4351215a4 100644 --- a/src/libsystemd/sd-bus/bus-dump.c +++ b/src/libsystemd/sd-bus/bus-dump.c @@ -112,9 +112,9 @@ int bus_message_dot_dump(sd_bus_message *m, FILE *f) { void dot_dump_unique_name(sd_bus *bus, const 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; @@ -146,8 +146,6 @@ void dot_dump_unique_name(sd_bus *bus, const char *name, Hashmap *hashmap_wkn, F } } - int x, y; - if (!f) f = stdout; diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c index 44293ad5a5..f1fd9a89c1 100644 --- a/src/libsystemd/sd-login/sd-login.c +++ b/src/libsystemd/sd-login/sd-login.c @@ -1067,7 +1067,7 @@ _public_ int sd_login_monitor_get_timeout(sd_login_monitor *m, uint64_t *timeout #define CONTAINER_UID_MIN 6000 #define CONTAINER_UID_MAX 6999 -static uid_t uid_min = 0, uid_max = 0; +static uid_t uid_minimum = 0, uid_maximum = 0; static uid_t con_uid_min = 0, con_uid_max = 0; static int sd_get_uid_range(uid_t *start, uid_t *end) @@ -1075,23 +1075,23 @@ static int sd_get_uid_range(uid_t *start, uid_t *end) int r; _cleanup_free_ char *c_uid_min = NULL, *c_uid_max = NULL; - if(uid_min == 0) { + if(uid_minimum == 0) { r = parse_env_file(GUMD_CONF_FILE, NEWLINE, "UID_MIN", &c_uid_min, NULL); if (r < 0) return r; - uid_min = atoi(c_uid_min); + uid_minimum = atoi(c_uid_min); c_uid_min = NULL; } - *start = uid_min; + *start = uid_minimum; - if(uid_max == 0) { + if(uid_maximum == 0) { r = parse_env_file(GUMD_CONF_FILE, NEWLINE, "UID_MAX", &c_uid_max, NULL); if (r < 0) return r; - uid_max = atoi(c_uid_max); + uid_maximum = atoi(c_uid_max); c_uid_max = NULL; } - *end = uid_max; + *end = uid_maximum; return 0; } |