2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2018-02-21 17:54:35 +01:00
|
|
|
#pragma once
|
|
|
|
|
2019-03-09 21:30:45 +01:00
|
|
|
int update_reboot_parameter_and_warn(const char *parameter, bool keep);
|
2018-02-21 18:48:49 +01:00
|
|
|
|
|
|
|
typedef enum RebootFlags {
|
2018-06-07 16:03:43 +02:00
|
|
|
REBOOT_LOG = 1 << 0, /* log about what we are going to do and all errors */
|
|
|
|
REBOOT_DRY_RUN = 1 << 1, /* return 0 right before actually doing the reboot */
|
2020-08-20 11:23:26 +02:00
|
|
|
REBOOT_FALLBACK = 1 << 2, /* fall back to plain reboot() if argument-based reboot doesn't work, isn't configured or doesn't apply otherwise */
|
2018-02-21 18:48:49 +01:00
|
|
|
} RebootFlags;
|
|
|
|
|
2019-03-09 21:30:58 +01:00
|
|
|
int read_reboot_parameter(char **parameter);
|
2018-02-21 18:48:49 +01:00
|
|
|
int reboot_with_parameter(RebootFlags flags);
|
2019-08-01 14:34:51 +02:00
|
|
|
|
|
|
|
int shall_restore_state(void);
|