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