summaryrefslogtreecommitdiff
path: root/src/basic/path-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/path-util.c')
-rw-r--r--src/basic/path-util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index ed6d0f112..3aabe5278 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -895,11 +895,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) {