[systemd-devel] [PATCH 1/2] path-util: do not fail in path_is_mountpoint() if path doesn't exist

Mantas Mikulėnas grawity at gmail.com
Sun Sep 9 05:16:18 PDT 2012


This was accidentally lost in commit 1640a0b6b05b.

Signed-off-by: Mantas Mikulėnas <grawity at gmail.com>
---
 src/shared/path-util.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index 39f77f6..97a2005 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -387,8 +387,12 @@ fallback:
         else
                 r = lstat(t, &a);
 
-        if (r < 0)
+        if (r < 0) {
+                if (errno == ENOENT)
+                        return 0;
+
                 return -errno;
+        }
 
         r = path_get_parent(t, &parent);
         if (r < 0)
-- 
1.7.12



More information about the systemd-devel mailing list