]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mountpoint-util: update comment in is_name_to_handle_at_fatal_error()
authorMike Yuan <me@yhndnzj.com>
Mon, 20 Jan 2025 21:26:47 +0000 (22:26 +0100)
committerMike Yuan <me@yhndnzj.com>
Wed, 22 Jan 2025 00:12:10 +0000 (01:12 +0100)
We can now assume name_to_handle_at() syscall is available,
however the underlying fs can still lack support for it.

src/basic/mountpoint-util.c

index 15655cc075d98b1558972c696a1348cd8372c956..4ae5f5191feb5dde8c849eabf2873a97cfc2ea64 100644 (file)
 #define ORIGINAL_MAX_HANDLE_SZ 128
 
 bool is_name_to_handle_at_fatal_error(int err) {
-        /* name_to_handle_at() can return "acceptable" errors that are due to the context. For example the
-         * kernel does not support name_to_handle_at() at all (ENOSYS), or the syscall was blocked
-         * (EACCES/EPERM; maybe through seccomp, because we are running inside of a container), or the mount
-         * point is not triggered yet (EOVERFLOW, think autofs+nfs4), or some general name_to_handle_at()
+        /* name_to_handle_at() can return "acceptable" errors that are due to the context. For example
+         * the file system does not support name_to_handle_at() (EOPNOTSUPP), or the syscall was blocked
+         * (EACCES/EPERM; maybe through seccomp, because we are running inside of a container), or
+         * the mount point is not triggered yet (EOVERFLOW, think autofs+nfs4), or some general name_to_handle_at()
          * flakiness (EINVAL). However other errors are not supposed to happen and therefore are considered
          * fatal ones. */