chiark / gitweb /
Fix assertion failure when resuming from sleep/suspend
[elogind.git] / src / login / logind-action.h
index 552713637d13a95612bde2f57c4b873e9f668200..6b63b92d3c5e2c62432b8d938c4709f9ce62f8ee 100644 (file)
@@ -1,7 +1,6 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#ifndef foologindactionhfoo
-#define foologindactionhfoo
+#pragma once
 
 /***
   This file is part of systemd.
@@ -23,7 +22,7 @@
 ***/
 
 typedef enum HandleAction {
-        HANDLE_IGNORE,
+        HANDLE_IGNORE = 0,
         HANDLE_POWEROFF,
         HANDLE_REBOOT,
         HANDLE_HALT,
@@ -37,7 +36,6 @@ typedef enum HandleAction {
 } HandleAction;
 
 #include "logind.h"
-#include "logind-inhibit.h"
 
 int manager_handle_action(
                 Manager *m,
@@ -46,9 +44,9 @@ int manager_handle_action(
                 bool ignore_inhibited,
                 bool is_edge);
 
+int shutdown_or_sleep(Manager *m, HandleAction action);
+
 const char* handle_action_to_string(HandleAction h) _const_;
 HandleAction handle_action_from_string(const char *s) _pure_;
 
-int config_parse_handle_action(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-
-#endif
+int config_parse_handle_action(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);