ioctl.2
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 82 行
2
82 行
.\" SCCSID: @(#)ioctl.2 8.1 9/11/90.TH ioctl 2.SH Nameioctl \- control device.SH Syntax.nf.ft B#include <sys/ioctl.h>.PP.ft Bioctl(d, request, argp)int d, request;char *argp;.fi.ft R.SH Description.NXR "file descriptor" "controlling".NXR "ioctl system call"The.PN ioctlcall performs a variety of functionson open descriptors. In particular, many operatingcharacteristics of character special files (for example, terminals)can be controlled with .PN ioctlrequests.Certain .PN ioctlrequestsoperate on a number of device types. These includeinformational .PN ioctlrequests, such as.PN devioand .PN nbuf .The descriptions of various devices in the.I Reference Pages, Section 4: Special Filesdiscuss how.PN ioctlapplies to them. Also consult <sys/ioctl.h> for more information..PPAn .PN ioctl.I requesthas encoded in it whether the argument is an \*(lqin\*(rq parameteror \*(lqout\*(rq parameter, and the size of the argument \fIargp\fP in bytes.Macros and defines used in specifying an .PN ioctl.I requestare located in the file <sys/ioctl.h>..SH Return ValuesIf an error has occurred, a value of \-1 is returned, and.I errnois set to indicate the error..SH DiagnosticsThe.PN ioctlcall fails under the following conditions:.TP 15[EBADF]The \fId\fP is not a valid descriptor..TP 15[ENOTTY]The \fId\fP is not associated with a characterspecial device..TP 15[ENOTTY]The specified request does not apply to the kindof object which the descriptor \fId\fP references..TP 15[EINVAL]The \fIrequest\fP or \fIargp\fP is not valid..TP 15[EFAULT]The \fIargp\fR points to memory that is not part of the process'address space..SH See Alsoexecve(2), fcntl(2), devio(4), intro(4n), mu(4), nbuf(4), tty(4)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?