1
0
mirror of https://github.com/systemd/systemd synced 2026-04-18 04:55:04 +02:00

Compare commits

..

No commits in common. "05aca544685cc0e5b8587dc346c548b3d14b3c18" and "2b560c6e545346e9791962e37361ca044fca036e" have entirely different histories.

5 changed files with 33 additions and 24 deletions

View File

@ -629,7 +629,7 @@
endpoint answers ARP requests from the local bridge on behalf endpoint answers ARP requests from the local bridge on behalf
of remote Distributed Overlay Virtual Ethernet of remote Distributed Overlay Virtual Ethernet
<ulink url="https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet"> <ulink url="https://en.wikipedia.org/wiki/Distributed_Overlay_Virtual_Ethernet">
(DOVE)</ulink> clients. Defaults to false.</para> (DVOE)</ulink> clients. Defaults to false.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -99,8 +99,12 @@ Job* job_free(Job *j) {
assert(!j->subject_list); assert(!j->subject_list);
assert(!j->object_list); assert(!j->object_list);
while (!LIST_IS_EMPTY(j->triggered_by)) do {
LIST_POP(triggered_by, j->triggered_by); Unit *tu = NULL;
LIST_FOREACH(triggered_by, tu, j->triggered_by)
LIST_REMOVE(triggered_by, j->triggered_by, tu);
} while (!LIST_IS_EMPTY(j->triggered_by));
job_unlink(j); job_unlink(j);

View File

@ -1482,27 +1482,36 @@ static int service_create_monitor_md_env(Job *j, char **ret) {
if (!env_source) if (!env_source)
continue; continue;
/* Add the environment variable name first. */ if (first) {
if (first && !strextend(&var, "MONITOR_METADATA=")) /* Add the environment variable name first. */
return -ENOMEM; r = strextendf(&var, "MONITOR_METADATA=");
if (r < 0)
return r;
if (!strextend(&var, !first ? list_delim : "", "SERVICE_RESULT=", service_result_to_string(env_source->result))) }
return -ENOMEM;
r = strextendf(&var, "%sSERVICE_RESULT=%s",
!first ? list_delim : "", service_result_to_string(env_source->result));
if (r < 0)
return r;
first = false; first = false;
if (env_source->main_exec_status.pid > 0 && if (env_source->main_exec_status.pid > 0 &&
dual_timestamp_is_set(&env_source->main_exec_status.exit_timestamp)) { dual_timestamp_is_set(&env_source->main_exec_status.exit_timestamp)) {
if (!strextend(&var, ",EXIT_CODE=", sigchld_code_to_string(env_source->main_exec_status.code))) r = strextendf(&var, ",EXIT_CODE=%s",
return -ENOMEM; sigchld_code_to_string(env_source->main_exec_status.code));
if (r < 0)
return r;
if (env_source->main_exec_status.code == CLD_EXITED) { if (env_source->main_exec_status.code == CLD_EXITED)
r = strextendf(&var, ",EXIT_STATUS=%i", r = strextendf(&var, ",EXIT_STATUS=%i",
env_source->main_exec_status.status); env_source->main_exec_status.status);
if (r < 0) else
return r; r = strextendf(&var, ",EXIT_STATUS=%s",
} else if (!strextend(&var, ",EXIT_STATUS=", signal_to_string(env_source->main_exec_status.status))) signal_to_string(env_source->main_exec_status.status));
return -ENOMEM; if (r < 0)
return r;
} }
if (!sd_id128_is_null(UNIT(env_source)->invocation_id)) { if (!sd_id128_is_null(UNIT(env_source)->invocation_id)) {
@ -1512,8 +1521,9 @@ static int service_create_monitor_md_env(Job *j, char **ret) {
return r; return r;
} }
if (!strextend(&var, ",UNIT=", UNIT(env_source)->id)) r = strextendf(&var, ",UNIT=%s", UNIT(env_source)->id);
return -ENOMEM; if (r < 0)
return r;
} }
*ret = TAKE_PTR(var); *ret = TAKE_PTR(var);

View File

@ -133,10 +133,6 @@ static int open_watchdog(void) {
fn = !watchdog_device || path_equal(watchdog_device, "/dev/watchdog") ? fn = !watchdog_device || path_equal(watchdog_device, "/dev/watchdog") ?
"/dev/watchdog0" : watchdog_device; "/dev/watchdog0" : watchdog_device;
r = free_and_strdup(&watchdog_device, fn);
if (r < 0)
return log_oom_debug();
watchdog_fd = open(fn, O_WRONLY|O_CLOEXEC); watchdog_fd = open(fn, O_WRONLY|O_CLOEXEC);
if (watchdog_fd < 0) if (watchdog_fd < 0)
return log_debug_errno(errno, "Failed to open watchdog device %s, ignoring: %m", fn); return log_debug_errno(errno, "Failed to open watchdog device %s, ignoring: %m", fn);

View File

@ -531,9 +531,8 @@ int main(int argc, char *argv[]) {
need_md_detach ? " MD devices," : ""); need_md_detach ? " MD devices," : "");
} }
/* We're done with the watchdog. Note that the watchdog is explicitly not /* We're done with the watchdog. */
* stopped here. It remains active to guard against any issues during the watchdog_close(true);
* rest of the shutdown sequence. */
watchdog_free_device(); watchdog_free_device();
arguments[0] = NULL; arguments[0] = NULL;