diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-28 15:05:45 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-28 15:09:26 +0100 |
commit | d14ab08b29d5b0b3ead6e63ac8be472f273011f9 (patch) | |
tree | ce5518f1eea8ef7490230273dc51ba1acc81af4b | |
parent | 63b575175efb60d6c51bae6a91be7547153fdd8d (diff) |
bus: fix a couple of format string mistakes
-rw-r--r-- | src/core/dbus-manager.c | 2 | ||||
-rw-r--r-- | src/core/dbus.c | 2 | ||||
-rw-r--r-- | src/locale/localed.c | 4 | ||||
-rw-r--r-- | src/login/logind-dbus.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 38004a07fb..5a998e3082 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -547,7 +547,7 @@ static int method_start_transient_unit(sd_bus *bus, sd_bus_message *message, voi return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid unit type."); if (!unit_vtable[t]->can_transient) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unit type %s does not support transient units."); + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unit type %s does not support transient units.", unit_type_to_string(t)); mode = job_mode_from_string(smode); if (mode < 0) diff --git a/src/core/dbus.c b/src/core/dbus.c index 967f991644..4111a14ee0 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -173,7 +173,7 @@ static int signal_activation_request(sd_bus *bus, sd_bus_message *message, void goto failed; if (u->refuse_manual_start) { - r = sd_bus_error_setf(&error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, %u may be requested by dependency only.", u->id); + r = sd_bus_error_setf(&error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, %s may be requested by dependency only.", u->id); goto failed; } diff --git a/src/locale/localed.c b/src/locale/localed.c index a1e0ab6fe8..7a6a96f68f 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -948,7 +948,7 @@ static int method_set_vc_keyboard(sd_bus *bus, sd_bus_message *m, void *userdata if ((keymap && (!filename_is_safe(keymap) || !string_is_safe(keymap))) || (keymap_toggle && (!filename_is_safe(keymap_toggle) || !string_is_safe(keymap_toggle)))) - return sd_bus_error_set_errnof(error, r, "Received invalid keymap data: %s", -EINVAL); + return sd_bus_error_set_errnof(error, -EINVAL, "Received invalid keymap data"); r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.locale1.set-keyboard", @@ -1020,7 +1020,7 @@ static int method_set_x11_keyboard(sd_bus *bus, sd_bus_message *m, void *userdat (model && !string_is_safe(model)) || (variant && !string_is_safe(variant)) || (options && !string_is_safe(options))) - return sd_bus_error_set_errnof(error, r, "Received invalid keyboard data: %s", -EINVAL); + return sd_bus_error_set_errnof(error, -EINVAL, "Received invalid keyboard data"); r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.locale1.set-keyboard", diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 7ece815155..08510b5ecc 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -495,7 +495,7 @@ static int method_create_session(sd_bus *bus, sd_bus_message *message, void *use else { seat = hashmap_get(m->seats, cseat); if (!seat) - return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_SEAT, "No seat '%s' known", seat); + return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_SEAT, "No seat '%s' known", cseat); } if (tty_is_vc(tty)) { @@ -504,7 +504,7 @@ static int method_create_session(sd_bus *bus, sd_bus_message *message, void *use if (!seat) seat = m->seat0; else if (seat != m->seat0) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "TTY %s is virtual console but seat %s is not seat0", tty, seat); + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "TTY %s is virtual console but seat %s is not seat0", tty, seat->id); v = vtnr_from_tty(tty); if (v <= 0) |