mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
38a350061e
commit
9f4e736ad0
|
@ -278,8 +278,12 @@ The following additional errors can occur for
|
|||
.BR faccessat ():
|
||||
.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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -293,8 +293,12 @@ The following additional errors can occur for
|
|||
.BR fchownat ():
|
||||
.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
|
||||
|
|
|
@ -121,9 +121,12 @@ can also occur for
|
|||
The following additional errors can occur for
|
||||
.BR execveat ():
|
||||
.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
|
||||
|
|
|
@ -99,8 +99,12 @@ The following additional errors can occur for
|
|||
.BR futimesat ():
|
||||
.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
|
||||
|
|
10
man2/link.2
10
man2/link.2
|
@ -282,10 +282,14 @@ The following additional errors can occur for
|
|||
.BR linkat ():
|
||||
.TP
|
||||
.B EBADF
|
||||
.I oldpath
|
||||
.RI ( newpath )
|
||||
is relative but
|
||||
.I olddirfd
|
||||
or
|
||||
.I newdirfd
|
||||
is not a valid file descriptor.
|
||||
.RI ( newdirfd )
|
||||
is neither
|
||||
.B AT_FDCWD
|
||||
nor a valid file descriptor.
|
||||
.TP
|
||||
.B EINVAL
|
||||
An invalid flag value was specified in
|
||||
|
|
|
@ -192,8 +192,12 @@ The following additional errors can occur for
|
|||
.BR mkdirat ():
|
||||
.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
|
||||
|
|
|
@ -229,8 +229,12 @@ The following additional errors can occur for
|
|||
.BR mknodat ():
|
||||
.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
|
||||
|
|
|
@ -408,8 +408,12 @@ is set to indicate the cause of the error.
|
|||
.SH ERRORS
|
||||
.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 EBADF
|
||||
.I userns_fd
|
||||
|
|
|
@ -1290,8 +1290,12 @@ The following additional errors can occur for
|
|||
.BR openat ():
|
||||
.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
|
||||
|
|
|
@ -349,9 +349,11 @@ is not an open file descriptor.
|
|||
.TP
|
||||
.B EBADF
|
||||
.I pathname
|
||||
is relative and
|
||||
is relative but
|
||||
.I dirfd
|
||||
is not a valid file descriptor.
|
||||
is neither
|
||||
.B AT_FDCWD
|
||||
nor a valid file descriptor.
|
||||
.TP
|
||||
.B EFAULT
|
||||
.IR handle
|
||||
|
|
|
@ -200,8 +200,12 @@ The following additional errors can occur for
|
|||
.BR readlinkat ():
|
||||
.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
|
||||
|
|
|
@ -438,9 +438,11 @@ and
|
|||
.BR renameat2 ():
|
||||
.TP
|
||||
.B EBADF
|
||||
.I oldpath
|
||||
.RI ( newpath )
|
||||
is relative but
|
||||
.I olddirfd
|
||||
or
|
||||
.I newdirfd
|
||||
.RI ( newdirfd )
|
||||
is not a valid file descriptor.
|
||||
.TP
|
||||
.B ENOTDIR
|
||||
|
|
|
@ -434,8 +434,12 @@ The following additional errors can occur for
|
|||
.BR fstatat ():
|
||||
.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
|
||||
|
|
|
@ -505,8 +505,12 @@ in the path prefix of
|
|||
.BR path_resolution (7).)
|
||||
.TP
|
||||
.B EBADF
|
||||
.I pathname
|
||||
is relative but
|
||||
.I dirfd
|
||||
is not a valid open file descriptor.
|
||||
is neither
|
||||
.B AT_FDCWD
|
||||
nor a valid file descriptor.
|
||||
.TP
|
||||
.B EFAULT
|
||||
.I pathname
|
||||
|
|
|
@ -203,8 +203,12 @@ The following additional errors can occur for
|
|||
.BR symlinkat ():
|
||||
.TP
|
||||
.B EBADF
|
||||
.I linkpath
|
||||
is relative but
|
||||
.I newdirfd
|
||||
is not a valid file descriptor.
|
||||
is neither
|
||||
.B AT_FDCWD
|
||||
nor a valid file descriptor.
|
||||
.TP
|
||||
.B ENOENT
|
||||
.I linkpath
|
||||
|
|
|
@ -246,8 +246,12 @@ The following additional errors can occur for
|
|||
.BR unlinkat ():
|
||||
.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
|
||||
An invalid flag value was specified in
|
||||
|
|
|
@ -269,7 +269,7 @@ is not a valid file descriptor.
|
|||
.B EBADF
|
||||
.RB ( utimensat ())
|
||||
.I pathname
|
||||
is a relative pathname, but
|
||||
is relative but
|
||||
.I dirfd
|
||||
is neither
|
||||
.BR AT_FDCWD
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue