]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/fileio-label.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / basic / fileio-label.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 This file is part of systemd.
6
7 Copyright 2010 Lennart Poettering
8 Copyright 2010 Harald Hoyer
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 ***/
23
24 #include <stdio.h>
25
26 #include "fileio.h"
27
28 int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts);
29 static inline int write_string_file_atomic_label(const char *fn, const char *line) {
30 return write_string_file_atomic_label_ts(fn, line, NULL);
31 }
32 int write_env_file_label(const char *fname, char **l);
33 int fopen_temporary_label(const char *target,
34 const char *path, FILE **f, char **temp_path);