aboutsummaryrefslogtreecommitdiffstats
path: root/man2/chmod.2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2021-08-12 04:05:59 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-08-12 05:45:21 +0200
commit9f4e736ad072ee9b539fa55a6eeb012b98cdded7 (patch)
tree408e879b0440446862024bd8a36f92b9b0c9b42b /man2/chmod.2
parent38a350061eead6bf6d22db413f8d6b2fbcf08c96 (diff)
downloadman-pages-9f4e736ad072ee9b539fa55a6eeb012b98cdded7.tar.gz
access.2, chmod.2, chown.2, execveat.2, futimesat.2, link.2, mkdir.2, mknod.2, mount_setattr.2, open.2, open_by_handle_at.2, readlink.2, rename.2, stat.2, statx.2, symlink.2, unlink.2, utimensat.2, mkfifo.3, scandir.3: Fix EBADF error description
Make the description of the EBADF error for invalid 'dirfd' more uniform. In particular, note that the error only occurs when the pathname is relative, and that it occurs when the 'dirfd' is neither valid *nor* has the value AT_FDCWD. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2/chmod.2')
-rw-r--r--man2/chmod.26
1 files changed, 5 insertions, 1 deletions
diff --git a/man2/chmod.2 b/man2/chmod.2
index 017aab9d63..6862a7e3d2 100644
--- a/man2/chmod.2
+++ b/man2/chmod.2
@@ -309,8 +309,12 @@ The following additional errors can occur for
.BR fchmodat ():
.TP
.B EBADF
+.I pathname
+is relative but
.I dirfd
-is not a valid file descriptor.
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
.TP
.B EINVAL
Invalid flag specified in