diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-12 14:09:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 14:09:50 +0100 |
commit | 174eab0066561f98bb46a6ac64e2bcdc948ce159 (patch) | |
tree | eabff038bfa099cf374fb985df4d2cd62a8bc51b /src/core | |
parent | shutdown: release the watchdog finally (diff) | |
parent | pid1: voidify manager_override_watchdog() (diff) | |
download | systemd-174eab0066561f98bb46a6ac64e2bcdc948ce159.tar.xz systemd-174eab0066561f98bb46a6ac64e2bcdc948ce159.zip |
Merge pull request #22037 from fbuihuu/watchdog-minor-improvements
Watchdog minor improvements
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/dbus-manager.c | 3 | ||||
-rw-r--r-- | src/core/manager.c | 7 | ||||
-rw-r--r-- | src/core/manager.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 9b64a8074d..8dbb61eb05 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -314,7 +314,8 @@ static int property_set_watchdog(Manager *m, WatchdogType type, sd_bus_message * if (r < 0) return r; - return manager_override_watchdog(m, type, timeout); + manager_override_watchdog(m, type, timeout); + return 0; } static int property_set_runtime_watchdog( diff --git a/src/core/manager.c b/src/core/manager.c index 12c49e7fca..8841be4a72 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -3239,15 +3239,15 @@ void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout) { m->watchdog[t] = timeout; } -int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) { +void manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) { assert(m); if (MANAGER_IS_USER(m)) - return 0; + return; if (m->watchdog_overridden[t] == timeout) - return 0; + return; if (t == WATCHDOG_RUNTIME) { usec_t usec = timestamp_is_set(timeout) ? timeout : m->watchdog[t]; @@ -3256,7 +3256,6 @@ int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) { } m->watchdog_overridden[t] = timeout; - return 0; } int manager_reload(Manager *m) { diff --git a/src/core/manager.h b/src/core/manager.h index e445e4d751..8f9984aa51 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -573,7 +573,7 @@ ManagerTimestamp manager_timestamp_initrd_mangle(ManagerTimestamp s); usec_t manager_get_watchdog(Manager *m, WatchdogType t); void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout); -int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout); +void manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout); const char* oom_policy_to_string(OOMPolicy i) _const_; OOMPolicy oom_policy_from_string(const char *s) _pure_; |