From: Mantas Mikulėnas Date: Sun, 9 Sep 2012 12:16:19 +0000 (+0300) Subject: path-util: fall back to stat() if kernel does not support name_to_handle_at() X-Git-Tag: v190~152 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=fa125f4e44aaf102548ab464e3ea457214fd56e0;hp=8ac7549330c774b8ca04034c1303165fe6a920b0;p=elogind.git path-util: fall back to stat() if kernel does not support name_to_handle_at() Fixes instant hang on kernels that do not have CONFIG_FHANDLE enabled. --- diff --git a/src/shared/path-util.c b/src/shared/path-util.c index 97a200504..b51a68d6d 100644 --- 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) { - if (errno == ENOTSUP) - /* This file system does not support + if (errno == ENOSYS || errno == ENOTSUP) + /* This kernel or file system does not support * name_to_handle_at(), hence fallback to the * traditional stat() logic */ goto fallback;