diff --git a/plugins/pidfile.c b/plugins/pidfile.c index fee45573..41aa86ea 100644 --- a/plugins/pidfile.c +++ b/plugins/pidfile.c @@ -25,7 +25,7 @@ static void pidfile_callback(void *UNUSED(arg), int fd, int UNUSED(events)) sz = read(fd, ev_buf, sizeof(ev_buf)); if (sz <= 0) { - _pe("invalid inotify event\n"); + _pe("invalid inotify event"); return; } diff --git a/service.c b/service.c index 5794b0b2..f37305ab 100644 --- a/service.c +++ b/service.c @@ -779,7 +779,7 @@ restart: enabled = service_enabled(svc); _d("%20s(%4d): %8s %3sabled/%-7s cond:%-4s", svc->cmd, svc->pid, - svc_status(svc), enabled? "en" : "dis", svc_dirtystr(svc), + svc_status(svc), enabled ? "en" : "dis", svc_dirtystr(svc), condstr(cond_get_agg(svc->cond))); switch(svc->state) { diff --git a/svc.c b/svc.c index 3b7ed7d7..fb241b22 100644 --- a/svc.c +++ b/svc.c @@ -429,8 +429,10 @@ char *svc_status(svc_t *svc) case SVC_BLOCK_INETD_BUSY: return "busy"; } + case SVC_DONE_STATE: return "done"; + case SVC_STOPPING_STATE: switch (svc->type) { case SVC_TYPE_INETD_CONN: @@ -440,10 +442,13 @@ char *svc_status(svc_t *svc) default: return "stopping"; } + case SVC_WAITING_STATE: return "waiting"; + case SVC_READY_STATE: return "ready"; + case SVC_RUNNING_STATE: return "running"; @@ -460,8 +465,8 @@ const char *svc_dirtystr(svc_t *svc) return "updated"; else if (svc_is_changed(svc)) return "UNKNOWN"; - else - return "clean"; + + return "clean"; } /* Same base service, return unique ID */