chiark / gitweb /
Prep v239: path-util.[hc] - Masked path_simplify_and_warn() - Nowhere needed.
[elogind.git] / src / basic / path-util.c
index ed6d0f1121dbb08572b7c869c9e0ec02e3822e05..12e91c40a6e206ef6cd7034dd7f4c23ecf85ce00 100644 (file)
@@ -1,9 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-  This file is part of systemd.
-
-  Copyright 2010-2012 Lennart Poettering
-***/
 
 #include <errno.h>
 #include <limits.h>
@@ -895,11 +890,9 @@ bool hidden_or_backup_file(const char *filename) {
 #if 0 /// UNNEEDED by elogind
 bool is_device_path(const char *path) {
 
-        /* Returns true on paths that refer to a device, either in
-         * sysfs or in /dev */
+        /* Returns true on paths that likely refer to a device, either by path in sysfs or to something in /dev */
 
-        return path_startswith(path, "/dev/") ||
-               path_startswith(path, "/sys/");
+        return PATH_STARTSWITH_SET(path, "/dev/", "/sys/");
 }
 
 bool valid_device_node_path(const char *path) {
@@ -1022,6 +1015,7 @@ bool empty_or_root(const char *root) {
         return root[strspn(root, "/")] == 0;
 }
 
+#if 0 /// UNNEEDED by elogind
 int path_simplify_and_warn(
                 char *path,
                 unsigned flag,
@@ -1068,3 +1062,4 @@ int path_simplify_and_warn(
 
         return 0;
 }
+#endif // 0