fcntl.2: Change type of arg from "long" to "int"

Various fcntl(2) commands require an integral 'arg'.
The man page said it must be "long" in all such cases.
However, for the cases covered by POSIX, there is an
explicit requirement that these arguments be "int".
Update the man page to reflect. Probably, all of the
other "long" cases (not specified in POSIX) should
be "int", and this patch makes them so. Based on a
note fromEric Blake, relating to F_DUPFD_CLOEXEC.

Reported-by: Eric Blake <ebb9@byu.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-03-24 16:49:50 +13:00
parent d39a9b9833
commit ed9821bba0
1 changed files with 10 additions and 10 deletions

View File

@ -82,7 +82,7 @@ Whether or not this argument is required is determined by
The required argument type is indicated in parentheses after each The required argument type is indicated in parentheses after each
.I cmd .I cmd
name (in most cases, the required type is name (in most cases, the required type is
.IR long , .IR int ,
and we identify the argument using the name and we identify the argument using the name
.IR arg ), .IR arg ),
or or
@ -90,7 +90,7 @@ or
is specified if the argument is not required. is specified if the argument is not required.
.SS "Duplicating a file descriptor" .SS "Duplicating a file descriptor"
.TP .TP
.BR F_DUPFD " (\fIlong\fP)" .BR F_DUPFD " (\fIint\fP)"
Find the lowest numbered available file descriptor Find the lowest numbered available file descriptor
greater than or equal to greater than or equal to
.I arg .I arg
@ -106,7 +106,7 @@ See
.BR dup (2) .BR dup (2)
for further details. for further details.
.TP .TP
.BR F_DUPFD_CLOEXEC " (\fIlong\fP; since Linux 2.6.24)" .BR F_DUPFD_CLOEXEC " (\fIint\fP; since Linux 2.6.24)"
As for As for
.BR F_DUPFD , .BR F_DUPFD ,
but additionally set the but additionally set the
@ -139,7 +139,7 @@ Read the file descriptor flags;
.I arg .I arg
is ignored. is ignored.
.TP .TP
.BR F_SETFD " (\fIlong\fP)" .BR F_SETFD " (\fIint\fP)"
Set the file descriptor flags to the value specified by Set the file descriptor flags to the value specified by
.IR arg . .IR arg .
.SS "File status flags" .SS "File status flags"
@ -166,7 +166,7 @@ Get the file access mode and the file status flags;
.I arg .I arg
is ignored. is ignored.
.TP .TP
.BR F_SETFL " (\fIlong\fP)" .BR F_SETFL " (\fIint\fP)"
Set the file status flags to the value specified by Set the file status flags to the value specified by
.IR arg . .IR arg .
File access mode File access mode
@ -455,7 +455,7 @@ process group IDs are returned as negative values (but see BUGS below).
.I arg .I arg
is ignored. is ignored.
.TP .TP
.BR F_SETOWN " (\fIlong\fP)" .BR F_SETOWN " (\fIint\fP)"
Set the process ID or process group ID that will receive Set the process ID or process group ID that will receive
.B SIGIO .B SIGIO
and and
@ -663,7 +663,7 @@ the signal handler if installed with
.I arg .I arg
is ignored. is ignored.
.TP .TP
.BR F_SETSIG " (\fIlong\fP)" .BR F_SETSIG " (\fIint\fP)"
Set the signal sent when input or output becomes possible Set the signal sent when input or output becomes possible
to the value given in to the value given in
.IR arg . .IR arg .
@ -774,7 +774,7 @@ or
.BR truncate (2) .BR truncate (2)
the file referred to by that file descriptor. the file referred to by that file descriptor.
.TP .TP
.BR F_SETLEASE " (\fIlong\fP)" .BR F_SETLEASE " (\fIint\fP)"
Set or remove a file lease according to which of the following Set or remove a file lease according to which of the following
values is specified in the integer values is specified in the integer
.IR arg : .IR arg :
@ -912,7 +912,7 @@ that has been accessed by another process.
(This is useful if the caller holds leases against multiple files). (This is useful if the caller holds leases against multiple files).
.SS "File and directory change notification (dnotify)" .SS "File and directory change notification (dnotify)"
.TP .TP
.BR F_NOTIFY " (\fIlong\fP)" .BR F_NOTIFY " (\fIint\fP)"
(Linux 2.4 onward) (Linux 2.4 onward)
Provide notification when the directory referred to by Provide notification when the directory referred to by
.I fd .I fd
@ -1004,7 +1004,7 @@ See
.BR inotify (7). .BR inotify (7).
.SS "Changing the capacity of a pipe" .SS "Changing the capacity of a pipe"
.TP .TP
.BR F_SETPIPE_SZ " (\fIlong\fP; since Linux 2.6.35)" .BR F_SETPIPE_SZ " (\fIint\fP; since Linux 2.6.35)"
Change the capacity of the pipe referred to by Change the capacity of the pipe referred to by
.I fd .I fd
to be at least to be at least