Merge pull request #25 from westermo/wmo/2.4

Westermo fixes to Finit3
This commit is contained in:
Joachim Nilsson committed 2016-04-10 20:08:25 +02:00
commit 4efdc4fe19
3 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -48,7 +48,7 @@ static void pidfile_callback(void *UNUSED(arg), int fd, int UNUSED(events))
sz = read(fd, ev_buf, sizeof(ev_buf) - 1); sz = read(fd, ev_buf, sizeof(ev_buf) - 1);
if (sz <= 0) { if (sz <= 0) {
_pe("invalid inotify event\n"); _pe("invalid inotify event");
return; return;
} }
ev_buf[sz] = 0; ev_buf[sz] = 0;
+6 -1
View File
@@ -429,8 +429,10 @@ char *svc_status(svc_t *svc)
case SVC_BLOCK_INETD_BUSY: case SVC_BLOCK_INETD_BUSY:
return "busy"; return "busy";
} }
case SVC_DONE_STATE: case SVC_DONE_STATE:
return "done"; return "done";
case SVC_STOPPING_STATE: case SVC_STOPPING_STATE:
switch (svc->type) { switch (svc->type) {
case SVC_TYPE_INETD_CONN: case SVC_TYPE_INETD_CONN:
@@ -440,10 +442,13 @@ char *svc_status(svc_t *svc)
default: default:
return "stopping"; return "stopping";
} }
case SVC_WAITING_STATE: case SVC_WAITING_STATE:
return "waiting"; return "waiting";
case SVC_READY_STATE: case SVC_READY_STATE:
return "ready"; return "ready";
case SVC_RUNNING_STATE: case SVC_RUNNING_STATE:
return "running"; return "running";
@@ -460,7 +465,7 @@ const char *svc_dirtystr(svc_t *svc)
return "updated"; return "updated";
else if (svc_is_changed(svc)) else if (svc_is_changed(svc))
return "UNKNOWN"; return "UNKNOWN";
else
return "clean"; return "clean";
} }
+1 -1
View File
@@ -171,7 +171,7 @@ static inline int svc_has_sighup(svc_t *svc) { return svc && 0 != svc->sighup;
static inline void svc_starting (svc_t *svc) { svc->starting = 1; } static inline void svc_starting (svc_t *svc) { svc->starting = 1; }
static inline void svc_started (svc_t *svc) { svc->starting = 0; } static inline void svc_started (svc_t *svc) { svc->starting = 0; }
static inline int svc_is_starting(svc_t *svc) { 0 != svc->starting; } static inline int svc_is_starting(svc_t *svc) { return 0 != svc->starting; }
static inline int svc_is_dynamic(svc_t *svc) { return svc && 0 != svc->mtime; } static inline int svc_is_dynamic(svc_t *svc) { return svc && 0 != svc->mtime; }
static inline int svc_is_removed(svc_t *svc) { return svc && -1 == svc->dirty; } static inline int svc_is_removed(svc_t *svc) { return svc && -1 == svc->dirty; }