]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/emergency-action.h
io-util: add new IOVEC_INIT/IOVEC_MAKE macros
[thirdparty/systemd.git] / src / core / emergency-action.h
CommitLineData
2928b0a8
LP
1#pragma once
2
3/***
4 This file is part of systemd.
5
6 Copyright 2014 Lennart Poettering
7 Copyright 2012 Michael Olbrich
8
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
13
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
21***/
22
87a47f99
LN
23typedef enum EmergencyAction {
24 EMERGENCY_ACTION_NONE,
25 EMERGENCY_ACTION_REBOOT,
26 EMERGENCY_ACTION_REBOOT_FORCE,
27 EMERGENCY_ACTION_REBOOT_IMMEDIATE,
28 EMERGENCY_ACTION_POWEROFF,
29 EMERGENCY_ACTION_POWEROFF_FORCE,
30 EMERGENCY_ACTION_POWEROFF_IMMEDIATE,
31 _EMERGENCY_ACTION_MAX,
32 _EMERGENCY_ACTION_INVALID = -1
33} EmergencyAction;
2928b0a8
LP
34
35#include "macro.h"
36#include "manager.h"
37
87a47f99 38int emergency_action(Manager *m, EmergencyAction action, const char *reboot_arg, const char *reason);
2928b0a8 39
87a47f99
LN
40const char* emergency_action_to_string(EmergencyAction i) _const_;
41EmergencyAction emergency_action_from_string(const char *s) _pure_;