]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/mountpoint-util.c
mountpoint-util: fix error handling
[thirdparty/systemd.git] / src / basic / mountpoint-util.c
index d4a621c7ae81be32e5a103b976163c7ee61da4e6..df1f0ac34cdde7a78eeed4ecda8390a6476508fe 100644 (file)
@@ -272,7 +272,7 @@ int path_is_mount_point(const char *t, const char *root, int flags) {
 
         fd = open_parent(t, O_PATH|O_CLOEXEC, 0);
         if (fd < 0)
-                return -errno;
+                return fd;
 
         return fd_is_mount_point(fd, last_path_component(t), flags);
 }