chiark / gitweb /
fileio: document why fileio-label.c and fileio.c are two different modules
[elogind.git] / src / basic / fileio-label.h
1 #pragma once
2
3 /***
4   This file is part of systemd.
5
6   Copyright 2010 Lennart Poettering
7   Copyright 2010 Harald Hoyer
8
9   systemd is free software; you can redistribute it and/or modify it
10   under the terms of the GNU Lesser General Public License as published by
11   the Free Software Foundation; either version 2.1 of the License, or
12   (at your option) any later version.
13
14   systemd is distributed in the hope that it will be useful, but
15   WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   Lesser General Public License for more details.
18
19   You should have received a copy of the GNU Lesser General Public License
20   along with systemd; If not, see <http://www.gnu.org/licenses/>.
21 ***/
22
23 #include <stdio.h>
24
25 #include "fileio.h"
26
27 /* These functions are split out of fileio.h (and not for examplement just as flags to the functions they wrap) in
28  * order to optimize linking: This way, -lselinux is needed only for the callers of these functions that need selinux,
29  * but not for all */
30
31 int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts);
32 static inline int write_string_file_atomic_label(const char *fn, const char *line) {
33         return write_string_file_atomic_label_ts(fn, line, NULL);
34 }
35 #if 0 /// UNNEEDED by elogind
36 int write_env_file_label(const char *fname, char **l);
37 int fopen_temporary_label(const char *target,
38                           const char *path, FILE **f, char **temp_path);
39 #endif // 0