2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2013-02-14 12:26:13 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2015-11-18 22:46:33 +01:00
|
|
|
|
2018-11-30 21:07:21 +01:00
|
|
|
/* These functions are split out of fileio.h (and not for example just flags to the functions they wrap) in order to
|
|
|
|
* optimize linking: This way, -lselinux is needed only for the callers of these functions that need selinux, but not
|
|
|
|
* for all */
|
2017-11-27 16:06:39 +01:00
|
|
|
|
2017-05-11 16:23:36 +02:00
|
|
|
int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts);
|
|
|
|
static inline int write_string_file_atomic_label(const char *fn, const char *line) {
|
|
|
|
return write_string_file_atomic_label_ts(fn, line, NULL);
|
|
|
|
}
|
2018-02-22 14:21:30 +01:00
|
|
|
|
|
|
|
int create_shutdown_run_nologin_or_warn(void);
|