.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.P
-.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long " addr );
-.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long *" addr );
+.BI "int syscall(SYS_arch_prctl, int " op ", unsigned long " addr );
+.BI "int syscall(SYS_arch_prctl, int " op ", unsigned long *" addr );
.fi
.P
.IR Note :
.SH DESCRIPTION
.BR arch_prctl ()
sets architecture-specific process or thread state.
-.I code
-selects a subfunction
+.I op
+selects an operation
and passes argument
.I addr
to it;
points to an unmapped address or is outside the process address space.
.TP
.B EINVAL
-.I code
-is not a valid subcommand.
+.I op
+is not a valid operation.
.TP
.B ENODEV
.B ARCH_SET_CPUID
.SH RETURN VALUE
On success,
.BR epoll_wait ()
-returns the number of file descriptors ready for the requested I/O, or zero
-if no file descriptor became ready during the requested
+returns the number of file descriptors ready for the requested I/O operation,
+or zero if no file descriptor became ready during the requested
.I timeout
milliseconds.
On failure,
.nf
.B #include <fcntl.h>
.P
-.BI "int fcntl(int " fd ", int " cmd ", ... /* " arg " */ );"
+.BI "int fcntl(int " fd ", int " op ", ... /* " arg " */ );"
.fi
.SH DESCRIPTION
.BR fcntl ()
performs one of the operations described below on the open file descriptor
.IR fd .
The operation is determined by
-.IR cmd .
+.IR op .
.P
.BR fcntl ()
can take an optional third argument.
Whether or not this argument is required is determined by
-.IR cmd .
+.IR op .
The required argument type is indicated in parentheses after each
-.I cmd
+.I op
name (in most cases, the required type is
.IR int ,
and we identify the argument using the name
a particular operation is to invoke
.BR fcntl ()
with the desired
-.I cmd
+.I op
value and then test whether the call failed with
.BR EINVAL ,
indicating that the kernel does not recognize this value.
in
.BR open (2).
.SS File descriptor flags
-The following commands manipulate the flags associated with
+The following operations manipulate the flags associated with
a file descriptor.
Currently, only one such flag is defined:
.BR FD_CLOEXEC ,
in
.I arg
are ignored.
-On Linux, this command can change only the
+On Linux, this operation can change only the
.BR O_APPEND ,
.BR O_ASYNC ,
.BR O_DIRECT ,
By contrast with traditional record locks, the
.I l_pid
field of that structure must be set to zero
-when using the commands described below.
+when using the operations described below.
.P
-The commands for working with open file description locks are analogous
+The operations for working with open file description locks are analogous
to those used with traditional locks:
.TP
.BR F_OFD_SETLK " (\fIstruct flock *\fP)"
This is done by using the
.BR fcntl ()
.B F_SETFL
-command to set the
+operation to set the
.B O_ASYNC
file status flag on the file descriptor.
Subsequently, a
The
.BR fcntl ()
.B F_SETSIG
-command can be used to obtain delivery of a signal other than
+operation can be used to obtain delivery of a signal other than
.BR SIGIO .
.IP
Sending a signal to the owner process (group) specified by
then either remove or downgrade its lease.
A lease is removed by performing an
.B F_SETLEASE
-command specifying
+operation specifying
.I arg
as
.BR F_UNLCK .
the lease to a read lease.
This is done by performing an
.B F_SETLEASE
-command specifying
+operation specifying
.I arg
as
.BR F_RDLCK .
.BR SIGIO ,
but this can be changed using the
.B F_SETSIG
-command to
+operation to
.BR fcntl ().
If a
.B F_SETSIG
-command is performed (even one specifying
+operation is performed (even one specifying
.BR SIGIO ),
and the signal
handler is established using
.BR SIGIO ,
but this can be changed using the
.B F_SETSIG
-command to
+operation to
.BR fcntl ().
(Note that
.B SIGIO
for the inode referred to by
.IR fd .
.TP
-All other commands
+All other operations
Zero.
.P
On error, \-1 is returned, and
is not an open file descriptor
.TP
.B EBADF
-.I cmd
+.I op
is
.B F_SETLK
or
type of lock requested.
.TP
.B EBUSY
-.I cmd
+.I op
is
.B F_SETPIPE_SZ
and the new pipe capacity specified in
used to store data in the pipe.
.TP
.B EBUSY
-.I cmd
+.I op
is
.BR F_ADD_SEALS ,
.I arg
.B EDEADLK
It was detected that the specified
.B F_SETLKW
-command would cause a deadlock.
+operation would cause a deadlock.
.TP
.B EFAULT
.I lock
is outside your accessible address space.
.TP
.B EINTR
-.I cmd
+.I op
is
.B F_SETLKW
or
.BR signal (7).
.TP
.B EINTR
-.I cmd
+.I op
is
.BR F_GETLK ,
.BR F_SETLK ,
.TP
.B EINVAL
The value specified in
-.I cmd
+.I op
is not recognized by this kernel.
.TP
.B EINVAL
-.I cmd
+.I op
is
.B F_ADD_SEALS
and
includes an unrecognized sealing bit.
.TP
.B EINVAL
-.I cmd
+.I op
is
.B F_ADD_SEALS
or
does not support sealing.
.TP
.B EINVAL
-.I cmd
+.I op
is
.B F_DUPFD
and
.BR getrlimit (2)).
.TP
.B EINVAL
-.I cmd
+.I op
is
.B F_SETSIG
and
is not an allowable signal number.
.TP
.B EINVAL
-.I cmd
+.I op
is
.BR F_OFD_SETLK ,
.BR F_OFD_SETLKW ,
was not specified as zero.
.TP
.B EMFILE
-.I cmd
+.I op
is
.B F_DUPFD
and the per-process limit on the number of open file descriptors
.B ENOTDIR
.B F_NOTIFY
was specified in
-.IR cmd ,
+.IR op ,
but
.I fd
does not refer to a directory.
.TP
.B EPERM
-.I cmd
+.I op
is
.B F_SETPIPE_SZ
and the soft or hard user pipe limit has been reached; see
flag on a file that has the append-only attribute set.
.TP
.B EPERM
-.I cmd
+.I op
was
.BR F_ADD_SEALS ,
but
system call was added in Linux 2.4.
The newer system call employs a different structure for file locking,
.IR flock64 ,
-and corresponding commands,
+and corresponding operations,
.BR F_GETLK64 ,
.BR F_SETLK64 ,
and
system call was added in Linux 2.4.
The newer system call employs a different structure for file locking,
.IR flock64 ,
-and corresponding commands,
+and corresponding operations,
.BR F_GETLK64 ,
.BR F_SETLK64 ,
and
.nf
.B #include <sys/file.h>
.P
-.BI "int flock(int " fd ", int " operation );
+.BI "int flock(int " fd ", int " op );
.fi
.SH DESCRIPTION
Apply or remove an advisory lock on the open file specified by
.IR fd .
The argument
-.I operation
+.I op
is one of the following:
.RS 4
.TP 9
.BR signal (7).
.TP
.B EINVAL
-.I operation
+.I op
is invalid.
.TP
.B ENOLCK
.nf
.B #include <sys/ioctl.h>
.P
-.BI "int ioctl(int " fd ", unsigned long " request ", ...);" "\f[R] /* glibc, BSD */\f[]"
-.BI "int ioctl(int " fd ", int " request ", ...);" "\f[R] /* musl, other UNIX */\f[]"
+.BI "int ioctl(int " fd ", unsigned long " op ", ...);" "\f[R] /* glibc, BSD */\f[]"
+.BI "int ioctl(int " fd ", int " op ", ...);" "\f[R] /* musl, other UNIX */\f[]"
.fi
.SH DESCRIPTION
The
In particular, many operating characteristics of character special files
(e.g., terminals) may be controlled with
.BR ioctl ()
-requests.
+operations.
The argument
.I fd
must be an open file descriptor.
.P
-The second argument is a device-dependent request code.
+The second argument is a device-dependent operation code.
The third argument is an untyped pointer to memory.
It's traditionally
.BI "char *" argp
.P
An
.BR ioctl ()
-.I request
+.I op
has encoded in it whether the argument is an
.I in
parameter or
in bytes.
Macros and defines used in specifying an
.BR ioctl ()
-.I request
+.I op
are located in the file
.IR <sys/ioctl.h> .
See NOTES.
Usually, on success zero is returned.
A few
.BR ioctl ()
-requests use the return value as an output parameter
+operations use the return value as an output parameter
and return a nonnegative value on success.
On error, \-1 is returned, and
.I errno
references an inaccessible memory area.
.TP
.B EINVAL
-.I request
+.I op
or
.I argp
is not valid.
is not associated with a character special device.
.TP
.B ENOTTY
-The specified request does not apply to the kind of object that the
+The specified operation does not apply to the kind of object that the
file descriptor
.I fd
references.
.PD 0
.in +4n
.nf
-.BI "ioctl(int " fildes ", int " request ", struct sgttyb *" argp );
+.BI "ioctl(int " fildes ", int " op ", struct sgttyb *" argp );
.fi
.in
.P
.BR stty (2)
and
.BR gtty (2),
-and is polymorphic by request type (like a
+and is polymorphic by operation type (like a
.B void *
would be, if it had been available)).
.P
.PD 0
.in +4n
.nf
-.BI "ioctl(int " d ", unsigned long " request ", char *" argp );
+.BI "ioctl(int " d ", unsigned long " op ", char *" argp );
.fi
.in
.P
.PD 0
.in +4n
.nf
-.BI "int ioctl(int " fildes ", int " request ", ... /* " arg " */);"
+.BI "int ioctl(int " fildes ", int " op ", ... /* " arg " */);"
.fi
.in
.P
.\"
.SS ioctl structure
.\" added two sections - aeb
-Ioctl command values are 32-bit constants.
+Ioctl
+.I op
+values are 32-bit constants.
In principle these constants are completely arbitrary, but people have
tried to build some structure into them.
.P
.SH DESCRIPTION
The following Linux-specific
.BR ioctl (2)
-requests are supported for console terminals and virtual consoles.
-Each requires a third argument, assumed here to be
+operations are supported for console terminals and virtual consoles.
+Each operation requires a third argument, assumed here to be
.IR argp .
.TP
.B KDGETLED
struct vt_mode {
char mode; /* vt mode */
char waitv; /* if set, hang on writes if not active */
- short relsig; /* signal to raise on release req */
+ short relsig; /* signal to raise on release op */
short acqsig; /* signal to raise on acquisition */
short frsig; /* unused (set to 0) */
};
.TP
.B ENOTTY
The file descriptor is not associated with a character special device,
-or the specified request does not apply to it.
+or the specified operation does not apply to it.
.TP
.B EPERM
Insufficient permission.
and a status code for the deduplication operation is returned in
.IR status .
If even a single byte in the range does not match, the deduplication
-request will be ignored and
+operation request will be ignored and
.I status
set to
.BR FILE_DEDUPE_RANGE_DIFFERS .
.I fsmap_head.fmh_keys[0]
must contain the low key and
.I fsmap_head.fmh_keys[1]
-must contain the high key for the request.
+must contain the high key for the operation.
.P
For convenience, if
.I fmr_length
was passed in one of the fields that must be zero.
.TP
.B ENOMEM
-Insufficient memory to process the request.
+Insufficient memory to process the operation.
.TP
.B EOPNOTSUPP
-The filesystem does not support this command.
+The filesystem does not support this operation.
.TP
.B EUCLEAN
The filesystem metadata is corrupt and needs repair.
.P
.in +4n
.EX
-new_fd = ioctl(fd, request);
+new_fd = ioctl(fd, op);
.EE
.in
.P
.BR " Bnnn" ", " BOTHER ", " CBAUD ", " CLOCAL ,
.BR " TC*" { FLUSH , ON , OFF "} and other constants */"
.P
-.BI "int ioctl(int " fd ", int " cmd ", ...);"
+.BI "int ioctl(int " fd ", int " op ", ...);"
.fi
.SH DESCRIPTION
The
.BR ioctl (2)
-call for terminals and serial ports accepts many possible command arguments.
+call for terminals and serial ports accepts many possible operation arguments.
Most require a third argument, of varying type, here called
.I argp
or
.I tty_struct
corresponding to
.IR fd .
-This command was removed in Linux 2.5.67.
+This operation was removed in Linux 2.5.67.
.\" commit b3506a09d15dc5aee6d4bb88d759b157016e1864
.\" Author: Andries E. Brouwer <andries.brouwer@cwi.nl>
.\" Date: Tue Apr 1 04:42:46 2003 -0800
.SH ERRORS
.TP
.B EINVAL
-Invalid command parameter.
+Invalid operation parameter.
.TP
.B ENOIOCTLCMD
-Unknown command.
+Unknown operation.
.TP
.B ENOTTY
Inappropriate
.BR "#include <linux/userfaultfd.h>" " /* Definition of " UFFD* " constants */"
.B #include <sys/ioctl.h>
.P
-.BI "int ioctl(int " fd ", int " cmd ", ...);"
+.BI "int ioctl(int " fd ", int " op ", ...);"
.fi
.SH DESCRIPTION
Various
.P
.in +4n
.EX
-ioctl(fd, cmd, argp);
+ioctl(fd, op, argp);
.EE
.in
.P
In the above,
.I fd
is a file descriptor referring to a userfaultfd object,
-.I cmd
-is one of the commands listed below, and
+.I op
+is one of the operations listed below, and
.I argp
is a pointer to a data structure that is specific to
-.IR cmd .
+.IR op .
.P
The various
.BR ioctl (2)
.nf
.B #include <sys/msg.h>
.P
-.BI "int msgctl(int " msqid ", int " cmd ", struct msqid_ds *" buf );
+.BI "int msgctl(int " msqid ", int " op ", struct msqid_ds *" buf );
.fi
.SH DESCRIPTION
.BR msgctl ()
performs the control operation specified by
-.I cmd
+.I op
on the System\ V message queue with identifier
.IR msqid .
.P
Bits 0100, 0010, and 0001 (the execute bits) are unused by the system.
.P
Valid values for
-.I cmd
+.I op
are:
.TP
.B IPC_STAT
.TP
.B EACCES
The argument
-.I cmd
+.I op
is equal to
.B IPC_STAT
or
.TP
.B EFAULT
The argument
-.I cmd
+.I op
has the value
.B IPC_SET
or
.TP
.B EINVAL
Invalid value for
-.I cmd
+.I op
or
.IR msqid .
Or: for a
.TP
.B EPERM
The argument
-.I cmd
+.I op
has the value
.B IPC_SET
or
(The kernel distinguishes old and new calls by an
.B IPC_64
flag in
-.IR cmd .)
+.IR op .)
.SH NOTES
The
.BR IPC_INFO ,
.nf
.B #include <sys/prctl.h>
.P
-.BI "int prctl(int " operation ", ..."
+.BI "int prctl(int " op ", ..."
.BI " \fR/*\fP unsigned long " arg2 ", unsigned long " arg3 ,
.BI " unsigned long " arg4 ", unsigned long " arg5 " \fR*/\fP );"
.fi
.B PR_GET_SECCOMP
return the nonnegative values described above.
All other
-.I operation
+.I op
values return 0 on success.
On error, \-1 is returned, and
.I errno
.SH ERRORS
.TP
.B EACCES
-.I operation
+.I op
is
.B PR_SET_SECCOMP
and
above).
.TP
.B EACCES
-.I operation
+.I op
is
.BR PR_SET_MM ,
and
the file is not executable.
.TP
.B EBADF
-.I operation
+.I op
is
.BR PR_SET_MM ,
.I arg3
is not valid.
.TP
.B EBUSY
-.I operation
+.I op
is
.BR PR_SET_MM ,
.I arg3
is an invalid address.
.TP
.B EFAULT
-.I operation
+.I op
is
.BR PR_SET_SECCOMP ,
.I arg2
is an invalid address.
.TP
.B EFAULT
-.I operation
+.I op
is
.B PR_SET_SYSCALL_USER_DISPATCH
and
.TP
.B EINVAL
The value of
-.I operation
+.I op
is not recognized,
or not supported on this system.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_MCE_KILL
or
.B EINVAL
.I arg2
is not valid value for this
-.IR operation .
+.IR op .
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_SECCOMP
or
.BR CONFIG_SECCOMP .
.TP
.B EINVAL
-.I operation
+.I op
is
.BR PR_SET_SECCOMP ,
.I arg2
.BR CONFIG_SECCOMP_FILTER .
.TP
.B EINVAL
-.I operation
+.I op
is
.BR PR_SET_MM ,
and one of the following is true
.RE
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_PTRACER
and
or the PID of an existing process.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_PDEATHSIG
and
is not a valid signal number.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_DUMPABLE
and
.BR SUID_DUMP_USER .
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_TIMING
and
.BR PR_TIMING_STATISTICAL .
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_NO_NEW_PRIVS
and
is nonzero.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_GET_NO_NEW_PRIVS
and
is nonzero.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_THP_DISABLE
and
is nonzero.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_GET_THP_DISABLE
and
is nonzero.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_CAP_AMBIENT
and an unused argument
does not specify a valid capability.
.TP
.B EINVAL
-.I operation
+.I op
was
.B PR_GET_SPECULATION_CTRL
or
are not 0.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_PAC_RESET_KEYS
and the arguments are invalid or unsupported.
above for details.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SVE_SET_VL
and the arguments are invalid or unsupported,
above for details.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SVE_GET_VL
and SVE is not available on this platform.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_SYSCALL_USER_DISPATCH
and one of the following is true:
.RE
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_SET_TAGGED_ADDR_CTRL
and the arguments are invalid or unsupported.
above for details.
.TP
.B EINVAL
-.I operation
+.I op
is
.B PR_GET_TAGGED_ADDR_CTRL
and the arguments are invalid or unsupported.
above for details.
.TP
.B ENODEV
-.I operation
+.I op
was
.B PR_SET_SPECULATION_CTRL
the kernel or CPU does not support the requested speculation misfeature.
.TP
.B ENXIO
-.I operation
+.I op
was
.B PR_MPX_ENABLE_MANAGEMENT
or
Check that the kernel and processor have MPX support.
.TP
.B ENXIO
-.I operation
+.I op
was
.B PR_SET_SPECULATION_CTRL
implies that the control of the selected speculation misfeature is not possible.
for the bit fields to determine which option is available.
.TP
.B EOPNOTSUPP
-.I operation
+.I op
is
.B PR_SET_FP_MODE
and
has an invalid or unsupported value.
.TP
.B EPERM
-.I operation
+.I op
is
.BR PR_SET_SECUREBITS ,
and the caller does not have the
.BR capabilities (7)).
.TP
.B EPERM
-.I operation
+.I op
is
.B PR_SET_SPECULATION_CTRL
wherein the speculation was disabled with
and caller tried to enable it again.
.TP
.B EPERM
-.I operation
+.I op
is
.BR PR_SET_KEEPCAPS ,
and the caller's
.BR capabilities (7)).
.TP
.B EPERM
-.I operation
+.I op
is
.BR PR_CAPBSET_DROP ,
and the caller does not have the
capability.
.TP
.B EPERM
-.I operation
+.I op
is
.BR PR_SET_MM ,
and the caller does not have the
capability.
.TP
.B EPERM
-.I operation
+.I op
is
.B PR_CAP_AMBIENT
and
securebit has been set.
.TP
.B ERANGE
-.I operation
+.I op
was
.B PR_SET_SPECULATION_CTRL
and
.P
.in +4n
.EX
-.BI "ptrdiff_t prctl(int " operation ", int " arg2 ", int " arg3 );
+.BI "ptrdiff_t prctl(int " op ", int " arg2 ", int " arg3 );
.EE
.in
.P
.nf
.B #include <sys/ptrace.h>
.P
-.BI "long ptrace(enum __ptrace_request " request ", pid_t " pid ,
+.BI "long ptrace(enum __ptrace_request " op ", pid_t " pid ,
.BI " void *" addr ", void *" data );
.fi
.SH DESCRIPTION
value containing information that indicates
the cause of the stop in the tracee.
While the tracee is stopped,
-the tracer can use various ptrace requests to inspect and modify the tracee.
+the tracer can use various ptrace operations to inspect and modify the tracee.
The tracer then causes the tracee to continue,
optionally ignoring the delivered signal
(or even delivering a different signal instead).
.BR PTRACE_DETACH .
.P
The value of
-.I request
-determines the action to be performed:
+.I op
+determines the operation to be performed:
.TP
.B PTRACE_TRACEME
Indicate that this process is to be traced by its parent.
-A process probably shouldn't make this request if its parent
+A process probably shouldn't make this operation if its parent
isn't expecting to trace it.
.RI ( pid ,
.IR addr ,
.IP
The
.B PTRACE_TRACEME
-request is used only by the tracee;
-the remaining requests are used only by the tracer.
-In the following requests,
+operation is used only by the tracee;
+the remaining operations are used only by the tracer.
+In the following operations,
.I pid
specifies the thread ID of the tracee to be acted on.
-For requests other than
+For operations other than
.BR PTRACE_ATTACH ,
.BR PTRACE_SEIZE ,
.BR PTRACE_INTERRUPT ,
.BR ptrace ()
call.
Linux does not have separate text and data address spaces,
-so these two requests are currently equivalent.
+so these two operations are currently equivalent.
.RI ( data
is ignored; but see NOTES.)
.TP
.B PTRACE_PEEKTEXT
and
.BR PTRACE_PEEKDATA ,
-these two requests are currently equivalent.
+these two operations are currently equivalent.
.TP
.B PTRACE_POKEUSER
.\" PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
The
.I addr
argument is ignored.
-This request is currently
+This operation is currently
.\" As of 4.19-rc2
supported only on arm (and arm64, though only for backwards compatibility),
.\" commit 27aa55c5e5123fa8b8ad0156559d34d7edff58ca
The
.I addr
argument is ignored.
-These requests are currently
+These operations are currently
.\" As at 3.7
supported only on x86.
.TP
.I waitpid(WNOHANG)
may return 0 instead.
In other words, the tracee may be "not yet fully dead",
-but already refusing ptrace requests.
+but already refusing ptrace operations.
.P
The tracer can't assume that the tracee
.I always
At this point, the signal is not yet delivered to the process,
and can be suppressed by the tracer.
If the tracer doesn't suppress the signal,
-it passes the signal to the tracee in the next ptrace restart request.
+it passes the signal to the tracee in the next ptrace restart operation.
This second step of signal delivery is called
.I "signal injection"
in this manual page.
.P
where
.B PTRACE_restart
-is one of the restarting ptrace requests.
+is one of the restarting ptrace operations.
If
.I sig
is 0, then a signal is not delivered.
.BR tgkill (2)
instead.
.P
-The fact that signal injection requests may be ignored
+The fact that signal injection operations may be ignored
when restarting the tracee after
ptrace stops that are not signal-delivery-stops
is a cause of confusion among ptrace users.
etc.),
expiration of a POSIX timer,
change of state on a POSIX message queue,
-or completion of an asynchronous I/O request.
+or completion of an asynchronous I/O operation.
.TP
.IR si_code " == SI_KERNEL (0x80)"
.B SIGTRAP
.B PTRACE_INTERRUPT
command.
.P
-The request
+The operation
.P
.in +4n
.EX
.SH RETURN VALUE
On success, the
.B PTRACE_PEEK*
-requests return the requested data (but see NOTES),
+operations return the requested data (but see NOTES),
the
.B PTRACE_SECCOMP_GET_FILTER
-request returns the number of instructions in the BPF program,
+operation returns the number of instructions in the BPF program,
the
.B PTRACE_GET_SYSCALL_INFO
-request returns the number of bytes available to be written by the kernel,
-and other requests return zero.
+operation returns the number of bytes available to be written by the kernel,
+and other operations return zero.
.P
-On error, all requests return \-1, and
+On error, all operations return \-1, and
.I errno
is set to indicate the error.
Since the value returned by a successful
.B PTRACE_PEEK*
-request may be \-1, the caller must clear
+operation may be \-1, the caller must clear
.I errno
before the call, and then check it afterward
to determine whether or not an error occurred.
An attempt was made to set an invalid option.
.TP
.B EIO
-.I request
+.I op
is invalid, or an attempt was made to read from or
write to an invalid area in the tracer's or the tracee's memory,
or there was a word-alignment violation,
-or an invalid signal was specified during a restart request.
+or an invalid signal was specified during a restart operation.
.TP
.B EPERM
The specified process cannot be traced.
.B ESRCH
The specified process does not exist, or is not currently being traced
by the caller, or is not stopped
-(for requests that require a stopped tracee).
+(for operations that require a stopped tracee).
.SH STANDARDS
None.
.SH HISTORY
glibc currently declares
.BR ptrace ()
as a variadic function with only the
-.I request
+.I op
argument fixed.
It is recommended to always supply four arguments,
even if the requested operation does not use them,
.BR PTRACE_PEEKDATA ,
and
.B PTRACE_PEEKUSER
-requests have a different API: they store the result
+operations have a different API: they store the result
at the address specified by the
.I data
parameter, and the return value is the error flag.
" constants"
.RB " (or " <linux/dqblk_xfs.h> "; see NOTES) */"
.P
-.BI "int quotactl(int " cmd ", const char *_Nullable " special ", int " id ,
+.BI "int quotactl(int " op ", const char *_Nullable " special ", int " id ,
.BI " caddr_t " addr );
.fi
.SH DESCRIPTION
.BR quotactl ()
call manipulates disk quotas.
The
-.I cmd
-argument indicates a command to be applied to the user or
+.I op
+argument indicates an operation to be applied to the user or
group ID specified in
.IR id .
To initialize the
-.I cmd
+.I op
argument, use the
-.I QCMD(subcmd, type)
+.I QCMD(subop, type)
macro.
The
.I type
.BR PRJQUOTA ,
for project quotas.
The
-.I subcmd
+.I subop
value is described below.
.P
The
.P
The
.I addr
-argument is the address of an optional, command-specific, data structure
+argument is the address of an optional, operation-specific, data structure
that is copied in or out of the system.
The interpretation of
.I addr
is given with each operation below.
.P
The
-.I subcmd
+.I subop
value is one of the following operations:
.TP
.B Q_QUOTAON
which identify what types of quota
should be removed.
(Note that the quota type passed in the
-.I cmd
+.I op
argument is ignored, but should remain valid in order to pass preliminary
quotactl syscall handler checks.)
.IP
.SH ERRORS
.TP
.B EACCES
-.I cmd
+.I op
is
.BR Q_QUOTAON ,
and the quota file pointed to by
.IR special .
.TP
.B EBUSY
-.I cmd
+.I op
is
.BR Q_QUOTAON ,
but another
is invalid.
.TP
.B EINVAL
-.I cmd
+.I op
or
.I type
is invalid.
.TP
.B EINVAL
-.I cmd
+.I op
is
.BR Q_QUOTAON ,
but the specified quota file is corrupted.
.TP
.BR EINVAL " (since Linux 5.5)"
.\" 3dd4d40b420846dd35869ccc8f8627feef2cff32
-.I cmd
+.I op
is
.BR Q_XQUOTARM ,
but
for the specified operation.
.TP
.B ERANGE
-.I cmd
+.I op
is
.BR Q_SETQUOTA ,
but the specified limits are out of the range allowed by the quota format.
Quotas have not been turned on for this filesystem.
.TP
.B ESRCH
-.I cmd
+.I op
is
.BR Q_QUOTAON ,
but the specified quota format was not found.
.TP
.B ESRCH
-.I cmd
+.I op
is
.B Q_GETNEXTQUOTA
or
.BR "#include <sys/syscall.h> " "/* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.P
-.BI "int syscall(SYS_reboot, int " magic ", int " magic2 ", int " cmd ", void *" arg );
+.BI "int syscall(SYS_reboot, int " magic ", int " magic2 ", int " op ", void *" arg );
.P
/* Under glibc and most alternative libc's (including uclibc, dietlibc,
musl and a few others), some of the constants involved have gotten
.BR "#include <sys/reboot.h> " "/* Definition of " RB_* " constants */"
.B #include <unistd.h>
.P
-.BI "int reboot(int " cmd );
+.BI "int reboot(int " op );
.fi
.SH DESCRIPTION
The
(The hexadecimal values of these constants are meaningful.)
.P
The
-.I cmd
+.I op
argument can have the following values:
.TP
.B LINUX_REBOOT_CMD_CAD_OFF
is called
from a PID namespace other than the initial PID namespace
with one of the
-.I cmd
+.I op
values listed below,
it performs a "reboot" of that namespace:
the "init" process of the PID namespace is immediately terminated,
.BR pid_namespaces (7).
.P
The values that can be supplied in
-.I cmd
+.I op
when calling
.BR reboot ()
in this case are as follows:
signal.
.P
For the other
-.I cmd
+.I op
values,
.BR reboot ()
returns \-1 and
.BR EINVAL .
.SH RETURN VALUE
For the values of
-.I cmd
+.I op
that stop or restart the system,
a successful call to
.BR reboot ()
does not return.
For the other
-.I cmd
+.I op
values, zero is returned on success.
In all cases, \-1 is returned on failure, and
.I errno
.BR LINUX_REBOOT_CMD_RESTART2 .
.TP
.B EINVAL
-Bad magic numbers or \fIcmd\fP.
+Bad magic numbers or
+.IR op .
.TP
.B EPERM
The calling process has insufficient privilege to call
.nf
.B #include <sys/sem.h>
.P
-.BI "int semctl(int " semid ", int " semnum ", int " cmd ", ...);"
+.BI "int semctl(int " semid ", int " semnum ", int " op ", ...);"
.fi
.SH DESCRIPTION
.BR semctl ()
performs the control operation specified by
-.I cmd
+.I op
on the System\ V semaphore set identified by
.IR semid ,
or on the
(The semaphores in a set are numbered starting at 0.)
.P
This function has three or four arguments, depending on
-.IR cmd .
+.IR op .
When there are four, the fourth has the type
.IR "union semun" .
The \fIcalling program\fP must define this union as follows:
Bits 0100, 0010, and 0001 (the execute bits) are unused by the system.
.P
Valid values for
-.I cmd
+.I op
are:
.TP
.B IPC_STAT
On success,
.BR semctl ()
returns a nonnegative value depending on
-.I cmd
+.I op
as follows:
.TP
.B GETNCNT
.BR SEM_STAT .
.P
All other
-.I cmd
+.I op
values return 0 on success.
.P
On failure,
.TP
.B EACCES
The argument
-.I cmd
+.I op
has one of the values
.BR GETALL ,
.BR GETPID ,
.TP
.B EINVAL
Invalid value for
-.I cmd
+.I op
or
.IR semid .
Or: for a
.TP
.B EPERM
The argument
-.I cmd
+.I op
has the value
.B IPC_SET
or
.TP
.B ERANGE
The argument
-.I cmd
+.I op
has the value
.B SETALL
or
(The kernel distinguishes old and new calls by an
.B IPC_64
flag in
-.IR cmd .)
+.IR op .)
.P
In some earlier versions of glibc, the
.I semun
.nf
.B #include <sys/shm.h>
.P
-.BI "int shmctl(int " shmid ", int " cmd ", struct shmid_ds *" buf );
+.BI "int shmctl(int " shmid ", int " op ", struct shmid_ds *" buf );
.fi
.SH DESCRIPTION
.BR shmctl ()
performs the control operation specified by
-.I cmd
+.I op
on the System\ V shared memory segment whose identifier is given in
.IR shmid .
.P
flag.)
.P
Valid values for
-.I cmd
+.I op
are:
.TP
.B IPC_STAT
to obtain the same information).
.P
The caller can prevent or allow swapping of a shared
-memory segment with the following \fIcmd\fP values:
+memory segment with the following
+.I op
+values:
.TP
.BR SHM_LOCK " (Linux-specific)"
Prevent swapping of the shared memory segment.
.TP
.B EFAULT
The argument
-.I cmd
+.I op
has value
.B IPC_SET
or
\fIshmid\fP points to a removed identifier.
.TP
.B EINVAL
-\fIshmid\fP is not a valid identifier, or \fIcmd\fP
-is not a valid command.
+.I shmid
+is not a valid identifier, or
+.I op
+is not a valid operation.
Or: for a
.B SHM_STAT
or
(The kernel distinguishes old and new calls by an
.B IPC_64
flag in
-.IR cmd .)
+.IR op .)
.SH NOTES
The
.BR IPC_INFO ,
.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.