summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-edit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-02-21 17:11:52 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-22 14:15:08 +0100
commit623461c13074542b9a4dd2e7f605b6b7f8be5286 (patch)
tree3a5c12933192f53d53ba806a9e7aaf985d76263a /src/systemctl/systemctl-edit.c
parentsystemctl: systematically rename verb entrypoints verb_xyz() (diff)
downloadsystemd-623461c13074542b9a4dd2e7f605b6b7f8be5286.tar.xz
systemd-623461c13074542b9a4dd2e7f605b6b7f8be5286.zip
systemctl: rework daemon_reload() functions
Let's split out the inner parts of verb_daemon_reload() as a function daemon_reload() and then stop using the former outside of the verbs logic, and instead call the latter whenever we need to reload the daemon as auxiliary opeation. This should make our logic more systematic as we don't have to provide fake or misleading argc/argv to verb_daemon_reload() anymore.
Diffstat (limited to 'src/systemctl/systemctl-edit.c')
-rw-r--r--src/systemctl/systemctl-edit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
index 4b19bf7015..f5123e80c1 100644
--- a/src/systemctl/systemctl-edit.c
+++ b/src/systemctl/systemctl-edit.c
@@ -569,8 +569,11 @@ int verb_edit(int argc, char *argv[], void *userdata) {
r = 0;
- if (!arg_no_reload && !install_client_side())
- r = verb_daemon_reload(argc, argv, userdata);
+ if (!arg_no_reload && !install_client_side()) {
+ r = daemon_reload(ACTION_RELOAD, /* graceful= */ false);
+ if (r > 0)
+ r = 0;
+ }
end:
STRV_FOREACH_PAIR(original, tmp, paths) {