]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/fstab-util: use is_device_path instead of is_device_node
authorMike Yuan <me@yhndnzj.com>
Sat, 5 Aug 2023 14:31:24 +0000 (22:31 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 5 Aug 2023 21:39:46 +0000 (22:39 +0100)
Follow-up for 99299d0d5a722812cedc0a23e4987f90a257c2d2

is_device_node() calls lstat(), causing device node
symlinks under /dev/disk/ not being compared correctly
using devnode_same().

Fixes #28585

src/shared/fstab-util.c

index c121d2617947ddcf0244b62fa2ce4f05e20bcb98..28121b8e2c61ba5a10e79825ffe33987d32f888f 100644 (file)
@@ -76,7 +76,7 @@ static int fstab_is_same_node(const char *what_fstab, const char *path) {
         if (path_equal(node, path))
                 return true;
 
-        if (is_device_node(path) && is_device_node(node))
+        if (is_device_path(path) && is_device_path(node))
                 return devnode_same(node, path);
 
         return false;