]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/fileio-label.h
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / src / basic / fileio-label.h
index 25fa351be276eb26475cb9f9ce16910f555b9195..ac49fd54208409051d23a102273cb14dd474d7f0 100644 (file)
@@ -1,5 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
 /***
@@ -7,25 +6,21 @@
 
   Copyright 2010 Lennart Poettering
   Copyright 2010 Harald Hoyer
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
 #include <stdio.h>
+
 #include "fileio.h"
 
-int write_string_file_atomic_label(const char *fn, const char *line);
+/* These functions are split out of fileio.h (and not for examplement just as 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 */
+
+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);
+}
 int write_env_file_label(const char *fname, char **l);
-int fopen_temporary_label(const char *target,
-                          const char *path, FILE **f, char **temp_path);
+int fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path);
+
+int create_shutdown_run_nologin_or_warn(void);