chiark / gitweb /
shared: add ALIGN_POWER2 macro
[elogind.git] / src / login / logind-action.c
index ae7b35055a86b48013870b1a6057655ad7c1cfc2..1928f43cd1c314191f872f21340466adac039734 100644 (file)
@@ -84,7 +84,9 @@ int manager_handle_action(
                  * treat like this under the assumption that there is
                  * no modern drm driver available. */
                 n = manager_count_displays(m);
-                if (n != 1) {
+                if (n < 0)
+                        log_warning("Display counting failed: %s", strerror(-n));
+                else if (n != 1) {
                         log_debug("Ignoring lid switch request, %i displays connected.", n);
                         return 0;
                 }