chiark / gitweb /
Prep v234: Re-add user/session to the gc_queue when stopping.
[elogind.git] / src / login / logind-core.c
index 23d2aee43e573920ade578219b423457eeea47c7..7e6b63f1286004fa720fd33a77407ac17f47e926 100644 (file)
@@ -269,7 +269,11 @@ int manager_process_button_device(Manager *m, struct udev_device *d) {
                         sn = "seat0";
 
                 button_set_seat(b, sn);
-                button_open(b);
+
+                r = button_open(b);
+                if (r < 0) /* event device doesn't have any keys or switches relevant to us? (or any other error
+                            * opening the device?) let's close the button again. */
+                        button_free(b);
         }
 
         return 0;
@@ -458,7 +462,7 @@ int manager_spawn_autovt(Manager *m, unsigned int vtnr) {
                         m->bus,
                         "org.freedesktop.systemd1",
                         "/org/freedesktop/systemd1",
-                        "org.freedesktop.systemd.Manager",
+                        "org.freedesktop.systemd1.Manager",
                         "StartUnit",
                         &error,
                         NULL,
@@ -525,7 +529,7 @@ static int manager_count_external_displays(Manager *m) {
                         continue;
 
                 /* Ignore internal displays: the type is encoded in
-                 * the sysfs name, as the second dash seperated item
+                 * the sysfs name, as the second dash separated item
                  * (the first is the card name, the last the connector
                  * number). We implement a whitelist of external
                  * displays here, rather than a whitelist, to ensure