Minor cleanup

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-04-10 19:57:48 +02:00
parent e7832e2ca7
commit cfa155deae
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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) {
+7 -2
View File
@@ -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 */