nspawn: voidify sd_notify() calls
This commit is contained in:
+8
-8
@@ -3616,11 +3616,11 @@ static int nspawn_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t r
|
||||
return log_oom();
|
||||
|
||||
if (strv_find(tags, "READY=1"))
|
||||
sd_notifyf(false, "READY=1\n");
|
||||
(void) sd_notifyf(false, "READY=1\n");
|
||||
|
||||
p = strv_find_startswith(tags, "STATUS=");
|
||||
if (p)
|
||||
sd_notifyf(false, "STATUS=Container running: %s", p);
|
||||
(void) sd_notifyf(false, "STATUS=Container running: %s", p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4472,9 +4472,9 @@ static int run_container(int master,
|
||||
* will make them appear in getpwuid(), thus we can release the /etc/passwd lock. */
|
||||
etc_passwd_lock = safe_close(etc_passwd_lock);
|
||||
|
||||
sd_notifyf(false,
|
||||
"STATUS=Container running.\n"
|
||||
"X_NSPAWN_LEADER_PID=" PID_FMT, *pid);
|
||||
(void) sd_notifyf(false,
|
||||
"STATUS=Container running.\n"
|
||||
"X_NSPAWN_LEADER_PID=" PID_FMT, *pid);
|
||||
if (!arg_notify_ready)
|
||||
(void) sd_notify(false, "READY=1\n");
|
||||
|
||||
@@ -5010,9 +5010,9 @@ static int run(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
finish:
|
||||
sd_notify(false,
|
||||
r == 0 && ret == EXIT_FORCE_RESTART ? "STOPPING=1\nSTATUS=Restarting..." :
|
||||
"STOPPING=1\nSTATUS=Terminating...");
|
||||
(void) sd_notify(false,
|
||||
r == 0 && ret == EXIT_FORCE_RESTART ? "STOPPING=1\nSTATUS=Restarting..." :
|
||||
"STOPPING=1\nSTATUS=Terminating...");
|
||||
|
||||
if (pid > 0)
|
||||
(void) kill(pid, SIGKILL);
|
||||
|
||||
Reference in New Issue
Block a user