chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
when determining unit file list, include invalid unit names in an "invalid" state
[elogind.git]
/
src
/
shared
/
path-util.c
diff --git
a/src/shared/path-util.c
b/src/shared/path-util.c
index 2dddc8f2f689001e4b5dbd8dab206a9c01d5b508..b51a68d6d2ff7c47d1949cdbc3f2497f064dc9f1 100644
(file)
--- a/
src/shared/path-util.c
+++ b/
src/shared/path-util.c
@@
-349,8
+349,8
@@
int path_is_mount_point(const char *t, bool allow_symlink) {
r = name_to_handle_at(AT_FDCWD, t, h, &mount_id, allow_symlink ? AT_SYMLINK_FOLLOW : 0);
if (r < 0) {
r = name_to_handle_at(AT_FDCWD, t, h, &mount_id, allow_symlink ? AT_SYMLINK_FOLLOW : 0);
if (r < 0) {
- if (errno == ENOTSUP)
- /* This file system does not support
+ if (errno == ENO
SYS || errno == ENO
TSUP)
+ /* This
kernel or
file system does not support
* name_to_handle_at(), hence fallback to the
* traditional stat() logic */
goto fallback;
* name_to_handle_at(), hence fallback to the
* traditional stat() logic */
goto fallback;
@@
-385,10
+385,14
@@
fallback:
if (allow_symlink)
r = stat(t, &a);
else
if (allow_symlink)
r = stat(t, &a);
else
- r = lstat(t, &b);
+ r = lstat(t, &a);
+
+ if (r < 0) {
+ if (errno == ENOENT)
+ return 0;
- if (r < 0)
return -errno;
return -errno;
+ }
r = path_get_parent(t, &parent);
if (r < 0)
r = path_get_parent(t, &parent);
if (r < 0)