bus: fix a couple of format string mistakes
This commit is contained in:
parent
63b575175e
commit
d14ab08b29
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue