#include "raw-clone.h"
#include "rlimit-util.h"
#include "signal-util.h"
+#include "string-table.h"
#include "terminal-util.h"
#include "virt.h"
if (r < 0)
log_debug_errno(r, "I had trouble setting up the crash handler, ignoring: %m");
}
+
+static const char* const crash_action_table[_CRASH_ACTION_MAX] = {
+ [CRASH_FREEZE] = "freeze",
+ [CRASH_REBOOT] = "reboot",
+ [CRASH_POWEROFF] = "poweroff",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(crash_action, CrashAction);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
+#include <errno.h>
+
#include "macro.h"
+typedef enum CrashAction {
+ CRASH_FREEZE,
+ CRASH_REBOOT,
+ CRASH_POWEROFF,
+ _CRASH_ACTION_MAX,
+ _CRASH_ACTION_INVALID = -EINVAL,
+} CrashAction;
+
+const char* crash_action_to_string(CrashAction action);
+CrashAction crash_action_from_string(const char *action);
+
_noreturn_ void freeze_or_exit_or_reboot(void);
void install_crash_handler(void);
#include "special.h"
#include "stat-util.h"
#include "stdio-util.h"
-#include "string-table.h"
#include "strv.h"
#include "switch-root.h"
#include "sysctl-util.h"
static int parse_configuration(const struct rlimit *saved_rlimit_nofile,
const struct rlimit *saved_rlimit_memlock);
-static const char* const crash_action_table[_CRASH_ACTION_MAX] = {
- [CRASH_FREEZE] = "freeze",
- [CRASH_REBOOT] = "reboot",
- [CRASH_POWEROFF] = "poweroff",
-};
-
-DEFINE_STRING_TABLE_LOOKUP(crash_action, CrashAction);
-
static DEFINE_CONFIG_PARSE_ENUM_WITH_DEFAULT(config_parse_crash_action, crash_action, CrashAction, CRASH_FREEZE);
static int manager_find_user_config_paths(char ***ret_files, char ***ret_dirs) {
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <errno.h>
#include <stdbool.h>
-typedef enum CrashAction {
- CRASH_FREEZE,
- CRASH_REBOOT,
- CRASH_POWEROFF,
- _CRASH_ACTION_MAX,
- _CRASH_ACTION_INVALID = -EINVAL,
-} CrashAction;
-
-const char* crash_action_to_string(CrashAction action);
-CrashAction crash_action_from_string(const char *action);
-
extern bool arg_dump_core;
extern int arg_crash_chvt;
extern bool arg_crash_shell;