X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fservice.c;h=fed8227299279ec11e0370465f90318825fde23f;hp=9086590cbb5b22386dff48fe48da824d41cfc92e;hb=46d95c0fe087a9a4475cae5430e9b33f6c46ff25;hpb=acb591e4523af82be3d76fde342e91c90a4bed38 diff --git a/src/service.c b/src/service.c index 9086590cb..fed822729 100644 --- a/src/service.c +++ b/src/service.c @@ -36,7 +36,6 @@ #define COMMENTS "#;\n" #define NEWLINES "\n\r" -#define LINE_MAX 4096 typedef enum RunlevelType { RUNLEVEL_UP, @@ -527,7 +526,7 @@ static int service_load_sysv_path(Service *s, const char *path) { state = LSB; - FOREACH_WORD(w, z, t+9, i) { + FOREACH_WORD_QUOTED(w, z, t+9, i) { char *n, *m; if (!(n = strndup(w, z))) { @@ -564,7 +563,7 @@ static int service_load_sysv_path(Service *s, const char *path) { state = LSB; - FOREACH_WORD(w, z, strchr(t, ':')+1, i) { + FOREACH_WORD_QUOTED(w, z, strchr(t, ':')+1, i) { char *n, *m; if (!(n = strndup(w, z))) { @@ -2086,28 +2085,28 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, } else if (streq(key, "main-exec-status-start-realtime")) { uint64_t k; - if ((r = safe_atollu(value, &k)) < 0) + if ((r = safe_atou64(value, &k)) < 0) log_debug("Failed to parse main-exec-status-start-realtime value %s", value); else s->main_exec_status.start_timestamp.realtime = (usec_t) k; } else if (streq(key, "main-exec-status-start-monotonic")) { uint64_t k; - if ((r = safe_atollu(value, &k)) < 0) + if ((r = safe_atou64(value, &k)) < 0) log_debug("Failed to parse main-exec-status-start-monotonic value %s", value); else s->main_exec_status.start_timestamp.monotonic = (usec_t) k; } else if (streq(key, "main-exec-status-exit-realtime")) { uint64_t k; - if ((r = safe_atollu(value, &k)) < 0) + if ((r = safe_atou64(value, &k)) < 0) log_debug("Failed to parse main-exec-status-exit-realtime value %s", value); else s->main_exec_status.exit_timestamp.realtime = (usec_t) k; } else if (streq(key, "main-exec-status-exit-monotonic")) { uint64_t k; - if ((r = safe_atollu(value, &k)) < 0) + if ((r = safe_atou64(value, &k)) < 0) log_debug("Failed to parse main-exec-status-exit-monotonic value %s", value); else s->main_exec_status.exit_timestamp.monotonic = (usec_t) k; @@ -2375,7 +2374,7 @@ static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) { break; case SERVICE_AUTO_RESTART: - log_debug("%s holdoff time over, scheduling restart.", u->meta.id); + log_info("%s holdoff time over, scheduling restart.", u->meta.id); service_enter_restart(s); break;