diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-07-05 17:54:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-07-10 16:39:16 +0200 |
commit | a93993584df69c84bd92c6a13453cab861061a51 (patch) | |
tree | 643fa40fd9ccc1e02fefa2edc8a3a57d270fc964 /src/machine | |
parent | test-fstab-generator: use test_env (diff) | |
download | systemd-a93993584df69c84bd92c6a13453cab861061a51.tar.xz systemd-a93993584df69c84bd92c6a13453cab861061a51.zip |
bus-unit-util: add common code for reloading PID 1
We have this very similar code in various places, and it#s not entirely
obvious (since we want a prolonged timeout for the reload), hence unify
this at one place.
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machinectl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 83ecfa7aba..7746ecba1a 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -1822,9 +1822,9 @@ static int enable_machine(int argc, char *argv[], void *userdata) { if (r < 0) return r; - r = bus_call_method(bus, bus_systemd_mgr, "Reload", &error, NULL, NULL); + r = bus_service_manager_reload(bus); if (r < 0) - return log_error_errno(r, "Failed to reload daemon: %s", bus_error_message(&error, r)); + return r; if (arg_now) { _cleanup_strv_free_ char **new_args = NULL; |