]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/emergency-action.h
grypt-util: drop two emacs modelines
[thirdparty/systemd.git] / src / core / emergency-action.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright 2014 Lennart Poettering
6 Copyright 2012 Michael Olbrich
7 ***/
8
9 typedef enum EmergencyAction {
10 EMERGENCY_ACTION_NONE,
11 EMERGENCY_ACTION_REBOOT,
12 EMERGENCY_ACTION_REBOOT_FORCE,
13 EMERGENCY_ACTION_REBOOT_IMMEDIATE,
14 EMERGENCY_ACTION_POWEROFF,
15 EMERGENCY_ACTION_POWEROFF_FORCE,
16 EMERGENCY_ACTION_POWEROFF_IMMEDIATE,
17 _EMERGENCY_ACTION_MAX,
18 _EMERGENCY_ACTION_INVALID = -1
19 } EmergencyAction;
20
21 #include "macro.h"
22 #include "manager.h"
23
24 int emergency_action(Manager *m, EmergencyAction action, const char *reboot_arg, const char *reason);
25
26 const char* emergency_action_to_string(EmergencyAction i) _const_;
27 EmergencyAction emergency_action_from_string(const char *s) _pure_;