]> git.ipfire.org Git - thirdparty/systemd.git/commit
basic/path-util: do not say that /dev and /sys are device paths
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Sep 2023 17:15:05 +0000 (19:15 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 18 Sep 2023 12:09:32 +0000 (14:09 +0200)
commit8f1998b8d3a5bfe61ee4d6d6aa6bb2efb94074c0
treebdaada54e64615a17ef10424bcfd71df588a4a7c
parentbf9a49a5534316353b9fdda1c40026781bc6bda8
basic/path-util: do not say that /dev and /sys are device paths

"/dev" or "/dev/" is the mount point, not a device path. In particular,
'systemctl status /dev' clearly does not refer to a device, so let's tweak
the code a bit to say that those are not device paths.

(Treating "/../dev" same as "/dev" would be also be reasonable, but that
requires chase(), which requires disk access, which we don't want to do from
this lightweight function.)
src/basic/path-util.c
src/test/test-path-util.c