fcntl.2: Describe how to check whether the kernel supports a particular command

Reported-by: Jeff Layton <jlayton@poochiereds.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-04-30 16:26:59 +02:00
parent 102b34d811
commit 6024e7332f
1 changed files with 11 additions and 0 deletions

View File

@ -89,6 +89,17 @@ and we identify the argument using the name
or
.I void
is specified if the argument is not required.
Certain of the operations below are supported only since a particular
Linux kernel version.
The preferred method of checking whether the host kernel supports
a particular operation is to invoke
.BR fcntl ()
with the desired
.IR cmd
value and then test whether the call failed with
.BR EINVAL ,
indicating that the kernel does not recognize this value.
.SS Duplicating a file descriptor
.TP
.BR F_DUPFD " (\fIint\fP)"