chiark / gitweb /
Prep v229: Add missing fixes from upstream [4/6] src/login
[elogind.git] / src / login / logind-action.c
index 474b69628e991013c2761f1e4954ddd939691edc..e1db89a88c1a569078efbbf24a1322f569be36f6 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 /***
   This file is part of systemd.
 
@@ -58,8 +56,7 @@ int manager_handle_action(
                 [HANDLE_HYBRID_SLEEP] = "Hibernating and suspending..."
         };
 
-/// elogind does this itself. No target table required
-#if 0
+#if 0 /// elogind does this itself. No target table required
         static const char * const target_table[_HANDLE_ACTION_MAX] = {
                 [HANDLE_POWEROFF] = SPECIAL_POWEROFF_TARGET,
                 [HANDLE_REBOOT] = SPECIAL_REBOOT_TARGET,
@@ -71,7 +68,7 @@ int manager_handle_action(
         };
 #endif // 0
 
-        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
         InhibitWhat inhibit_operation;
         Inhibitor *offending = NULL;
         bool supported;
@@ -165,8 +162,7 @@ int manager_handle_action(
 
         log_info("%s", message_table[handle]);
 
-/// elogind uses its own variant, which can use the handle directly.
-#if 0
+#if 0 /// elogind uses its own variant, which can use the handle directly.
         r = bus_manager_shutdown_or_sleep_now_or_later(m, target_table[handle], inhibit_operation, &error);
 #else
         r = bus_manager_shutdown_or_sleep_now_or_later(m, handle, inhibit_operation, &error);