mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
fix C++ compilation issues
Signed-off-by: Robert Andersson <robert.m.andersson@se.atlascopco.com>
This commit is contained in:
@@ -352,8 +352,8 @@ static void api_cb(uev_t *w, void *arg, int events)
|
||||
if (wdog) {
|
||||
logit(LOG_NOTICE, "Stopping and removing %s (PID:%d)", wdog->cmd, wdog->pid);
|
||||
stop(wdog);
|
||||
if (wdog->protected) {
|
||||
wdog->protected = 0;
|
||||
if (wdog->protect) {
|
||||
wdog->protect = 0;
|
||||
wdog->runlevels = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
svc_t *client_svc_find(char *arg)
|
||||
svc_t *client_svc_find(const char *arg)
|
||||
{
|
||||
int sd = -1;
|
||||
struct init_request rq = {
|
||||
|
||||
+1
-1
@@ -32,6 +32,6 @@ int client_disconnect (void);
|
||||
|
||||
int client_send (struct init_request *rq, ssize_t len);
|
||||
svc_t *client_svc_iterator (int first);
|
||||
svc_t *client_svc_find (char *arg);
|
||||
svc_t *client_svc_find (const char *arg);
|
||||
|
||||
#endif /* FINIT_CLIENT_H_ */
|
||||
|
||||
+1
-1
@@ -909,7 +909,7 @@ recreate:
|
||||
svc_mark_clean(svc);
|
||||
|
||||
if (!file)
|
||||
svc->protected = 1;
|
||||
svc->protect = 1;
|
||||
|
||||
/* Free duped line, from above */
|
||||
free(line);
|
||||
|
||||
@@ -402,7 +402,7 @@ void svc_mark_dynamic(void)
|
||||
svc_t *svc, *iter = NULL;
|
||||
|
||||
for (svc = svc_iterator(&iter, 1); svc; svc = svc_iterator(&iter, 0)) {
|
||||
if (svc->protected)
|
||||
if (svc->protect)
|
||||
continue;
|
||||
if (svc_is_inetd_conn(svc))
|
||||
continue;
|
||||
|
||||
@@ -97,7 +97,7 @@ typedef struct svc {
|
||||
long start_time; /* Start time, as seconds since boot, from sysinfo() */
|
||||
const svc_state_t state; /* Paused, Reloading, Restart, Running, ... */
|
||||
svc_type_t type; /* Service, run, task, inetd, ... */
|
||||
int protected; /* Services like dbus-daemon & udev by Finit */
|
||||
int protect; /* Services like dbus-daemon & udev by Finit */
|
||||
const int dirty; /* -1: removal, 0: unmodified, 1: modified */
|
||||
int starting; /* ... waiting for pidfile to be re-asserted */
|
||||
int runlevels;
|
||||
|
||||
Reference in New Issue
Block a user