diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-05-03 08:11:33 +0200 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-05-07 17:46:44 +0200 |
commit | 92cb8ebcb491939dbf55e7e8de7344e2342336a8 (patch) | |
tree | a2121d11dc74176234e22f51e32447c39c31e383 /src/mount | |
parent | machine: switch to BusLocator-oriented helpers (diff) | |
download | systemd-92cb8ebcb491939dbf55e7e8de7344e2342336a8.tar.xz systemd-92cb8ebcb491939dbf55e7e8de7344e2342336a8.zip |
mount: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
Diffstat (limited to 'src/mount')
-rw-r--r-- | src/mount/mount-tool.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 982e0a285e..469c14271c 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -551,13 +551,7 @@ static int start_transient_mount( if (r < 0) return log_error_errno(r, "Failed to make mount unit name: %m"); - r = sd_bus_message_new_method_call( - bus, - &m, - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", - "StartTransientUnit"); + r = bus_message_new_method_call(bus, &m, bus_systemd_mgr, "StartTransientUnit"); if (r < 0) return bus_log_create_error(r); @@ -638,13 +632,7 @@ static int start_transient_automount( if (r < 0) return log_error_errno(r, "Failed to make mount unit name: %m"); - r = sd_bus_message_new_method_call( - bus, - &m, - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", - "StartTransientUnit"); + r = bus_message_new_method_call(bus, &m, bus_systemd_mgr, "StartTransientUnit"); if (r < 0) return bus_log_create_error(r); @@ -854,13 +842,7 @@ static int stop_mount( if (r < 0) return log_error_errno(r, "Failed to make %s unit name from path %s: %m", suffix + 1, where); - r = sd_bus_message_new_method_call( - bus, - &m, - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", - "StopUnit"); + r = bus_message_new_method_call(bus, &m, bus_systemd_mgr, "StopUnit"); if (r < 0) return bus_log_create_error(r); |