.nf
.B #include <unistd.h>
.P
-.BI "int lockf(int " fd ", int " cmd ", off_t " len );
+.BI "int lockf(int " fd ", int " op ", off_t " len );
.fi
.P
.RS -4
The file is specified by
.IR fd ,
a file descriptor open for writing, the action by
-.IR cmd ,
+.IR op ,
and the section consists of byte positions
.IR pos .. pos + len \-1
if
.B EBADF
.I fd
is not an open file descriptor; or
-.I cmd
+.I op
is
.B F_LOCK
or
is not a writable file descriptor.
.TP
.B EDEADLK
-The command was
+.I op
+was
.B F_LOCK
and this lock operation would cause a deadlock.
.TP
.TP
.B EINVAL
An invalid operation was specified in
-.IR cmd .
+.IR op .
.TP
.B ENOLCK
Too many segment locks open, lock table is full.