]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/fileio-label.h
Merge pull request #10850 from poettering/log-setup
[thirdparty/systemd.git] / src / shared / fileio-label.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <stdio.h>
5
6 #include "fileio.h"
7
8 /* These functions are split out of fileio.h (and not for examplement just as flags to the functions they wrap) in
9 * order to optimize linking: This way, -lselinux is needed only for the callers of these functions that need selinux,
10 * but not for all */
11
12 int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts);
13 static inline int write_string_file_atomic_label(const char *fn, const char *line) {
14 return write_string_file_atomic_label_ts(fn, line, NULL);
15 }
16 int write_env_file_label(const char *fname, char **l);
17 int fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path);
18
19 int create_shutdown_run_nologin_or_warn(void);