]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/emergency-action.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / core / emergency-action.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
2928b0a8
LP
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 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22***/
23
87a47f99
LN
24typedef enum EmergencyAction {
25 EMERGENCY_ACTION_NONE,
26 EMERGENCY_ACTION_REBOOT,
27 EMERGENCY_ACTION_REBOOT_FORCE,
28 EMERGENCY_ACTION_REBOOT_IMMEDIATE,
29 EMERGENCY_ACTION_POWEROFF,
30 EMERGENCY_ACTION_POWEROFF_FORCE,
31 EMERGENCY_ACTION_POWEROFF_IMMEDIATE,
32 _EMERGENCY_ACTION_MAX,
33 _EMERGENCY_ACTION_INVALID = -1
34} EmergencyAction;
2928b0a8
LP
35
36#include "macro.h"
37#include "manager.h"
38
87a47f99 39int emergency_action(Manager *m, EmergencyAction action, const char *reboot_arg, const char *reason);
2928b0a8 40
87a47f99
LN
41const char* emergency_action_to_string(EmergencyAction i) _const_;
42EmergencyAction emergency_action_from_string(const char *s) _pure_;