chiark / gitweb /
bus: fix a couple of format string mistakes
authorLennart Poettering <lennart@poettering.net>
Sat, 28 Dec 2013 14:05:45 +0000 (15:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 28 Dec 2013 14:09:26 +0000 (15:09 +0100)
src/core/dbus-manager.c
src/core/dbus.c
src/locale/localed.c
src/login/logind-dbus.c

index 38004a07fbb66e8abe59b0ac1e9cafef4fed4513..5a998e30823e48fd2fb37e36966f9899d9453a13 100644 (file)
@@ -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)
index 967f991644d72b93d9ede3b7006a18f2ac27867d..4111a14ee0fa51982ae1e09dd13fb16306d8daf9 100644 (file)
@@ -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;
         }
 
index a1e0ab6fe876e72ec2926850eee48b8ea2d0be05..7a6a96f68fb1bbdc95876d18bbc2c517d59afb66 100644 (file)
@@ -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",
index 7ece815155cc4c41d8b16b0b4674bfd9d0b20e25..08510b5ecc8599bfee216a33aa5414d7209d2d93 100644 (file)
@@ -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)