]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mountpoint-util: fix error handling
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Jul 2020 15:43:10 +0000 (17:43 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 16 Jul 2020 05:56:40 +0000 (14:56 +0900)
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);
 }