]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/emergency-action.h
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / core / emergency-action.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
2928b0a8
LP
2#pragma once
3
4/***
2928b0a8
LP
5 Copyright 2014 Lennart Poettering
6 Copyright 2012 Michael Olbrich
2928b0a8
LP
7***/
8
87a47f99
LN
9typedef 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;
2928b0a8
LP
20
21#include "macro.h"
22#include "manager.h"
23
87a47f99 24int emergency_action(Manager *m, EmergencyAction action, const char *reboot_arg, const char *reason);
2928b0a8 25
87a47f99
LN
26const char* emergency_action_to_string(EmergencyAction i) _const_;
27EmergencyAction emergency_action_from_string(const char *s) _pure_;