diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-05-03 07:45:52 +0200 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-05-07 17:46:43 +0200 |
commit | e3c8ec3b334dfe8a113122cfccfa45cb46f7af5d (patch) | |
tree | 6e18d18f5b83e01ed3bb85fbcdbf4f019650955f /src/locale/localectl.c | |
parent | analyze: switch to BusLocator-oriented helpers (diff) | |
download | systemd-e3c8ec3b334dfe8a113122cfccfa45cb46f7af5d.tar.xz systemd-e3c8ec3b334dfe8a113122cfccfa45cb46f7af5d.zip |
locale: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
Diffstat (limited to 'src/locale/localectl.c')
-rw-r--r-- | src/locale/localectl.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/locale/localectl.c b/src/locale/localectl.c index 6f2d37d222..b7548a0f7f 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -163,13 +163,7 @@ static int set_locale(int argc, char **argv, void *userdata) { polkit_agent_open_if_enabled(arg_transport, arg_ask_password); - r = sd_bus_message_new_method_call( - bus, - &m, - "org.freedesktop.locale1", - "/org/freedesktop/locale1", - "org.freedesktop.locale1", - "SetLocale"); + r = bus_message_new_method_call(bus, &m, bus_locale, "SetLocale"); if (r < 0) return bus_log_create_error(r); @@ -215,11 +209,9 @@ static int set_vconsole_keymap(int argc, char **argv, void *userdata) { map = argv[1]; toggle_map = argc > 2 ? argv[2] : ""; - r = sd_bus_call_method( + r = bus_call_method( bus, - "org.freedesktop.locale1", - "/org/freedesktop/locale1", - "org.freedesktop.locale1", + bus_locale, "SetVConsoleKeyboard", &error, NULL, @@ -258,11 +250,9 @@ static int set_x11_keymap(int argc, char **argv, void *userdata) { variant = argc > 3 ? argv[3] : ""; options = argc > 4 ? argv[4] : ""; - r = sd_bus_call_method( + r = bus_call_method( bus, - "org.freedesktop.locale1", - "/org/freedesktop/locale1", - "org.freedesktop.locale1", + bus_locale, "SetX11Keyboard", &error, NULL, |