aboutsummaryrefslogtreecommitdiffstats
path: root/man3
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 /man3
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 'man3')
-rw-r--r--man3/mkfifo.36
-rw-r--r--man3/scandir.36
2 files changed, 10 insertions, 2 deletions
diff --git a/man3/mkfifo.3 b/man3/mkfifo.3
index e98c3488e2..85622b239d 100644
--- a/man3/mkfifo.3
+++ b/man3/mkfifo.3
@@ -162,8 +162,12 @@ The following additional errors can occur for
.BR mkfifoat ():
.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 ENOTDIR
.I pathname
diff --git a/man3/scandir.3 b/man3/scandir.3
index 0ea295ce33..ba7ef58cae 100644
--- a/man3/scandir.3
+++ b/man3/scandir.3
@@ -204,8 +204,12 @@ The following additional errors can occur for
.BR scandirat ():
.TP
.B EBADF
+.I dirp
+is relative but
.I dirfd
-is not a valid file descriptor.
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
.TP
.B ENOTDIR
.I dirp