📄 0785-0788.html
字号:
</TD><TD>
UMSDOS_UNLINK_EMD
</TD><TD>
const struct umsdos_ioctl *
</TD></TR><TR><TD>
0x000004D8
</TD><TD>
UMSDOS_READDIR_EMD
</TD><TD>
struct umsdos_ioctl * // I-O
</TD></TR><TR><TD>
0x000004D9
</TD><TD>
UMSDOS_GETVERSION
</TD><TD>
struct umsdos_ioctl *
</TD></TR><TR><TD>
0x000004DA
</TD><TD>
UMSDOS_INIT_EMD
</TD><TD>
void
</TD></TR><TR><TD>
0x000004DB
</TD><TD>
UMSDOS_DOS_SETUP
</TD><TD>
const struct umsdos_ioctl *
</TD></TR><TR><TD>
0x000004DC
</TD><TD>
UMSDOS_RENAME_DOS
</TD><TD>
const struct umsdos_ioctl *
</TD></TR></TABLE>
<!-- CODE SNIP //-->
<PRE>
<include/linux/vt.h>
</PRE>
<!-- END CODE SNIP //-->
<TABLE>
<TR><TD>
0x00005600
</TD><TD>
VT_OPENQRY
</TD><TD>
int *
</TD></TR><TR><TD>
0x00005601
</TD><TD>
VT_GETMODE
</TD><TD>
struct vt_mode *
</TD></TR><TR><TD>
0x00005602
</TD><TD>
VT_SETMODE
</TD><TD>
const struct vt_mode *
</TD></TR><TR><TD>
0x00005603
</TD><TD>
VT_GETSTATE
</TD><TD>
struct vt_stat *
</TD></TR><TR><TD>
0x00005604
</TD><TD>
VT_SENDSIG
</TD><TD>
void
</TD></TR><TR><TD>
0x00005605
</TD><TD>
VT_RELDISP
</TD><TD>
int
</TD></TR><TR><TD>
0x00005606
</TD><TD>
VT_ACTIVATE
</TD><TD>
int
</TD></TR><TR><TD>
0x00005607
</TD><TD>
VT_WAI TACTI VE
</TD><TD>
int
</TD></TR><TR><TD>
0x00005608
</TD><TD>
VT_DISALLOCATE
</TD><TD>
int
</TD></TR><TR><TD>
0x00005609
</TD><TD>
VT_RESIZE
</TD><TD>
const struct vt_sizes *
</TD></TR><TR><TD>
0x0000560A
</TD><TD>
VT_RESIZEX
</TD><TD>
const struct vt_consize *
</TD></TR></TABLE>
<A NAME="PAGENUM-787"><P>Page 787</P></A>
<P><B>
MORE ARGUMENTS
</B></P>
<P>Some ioctls take a pointer to a structure that contains additional pointers. These are documented here in alphabetical order.
</P>
<P>CDROMREADAUDIO takes an input pointer const struct cdrom read audio
*. The buf field points to an output buffer of
length nframes * CD FRAMESIZE RAW.
</P>
<P>CDROMREADCOOKED, CDROMREADMODE1, CDROMREADMODE2, and
CDROM-READRAW take an input pointer const struct cdrom msf
*. They use the same pointer as an output pointer to
char []. The length varies by request. For
CDROMREADMODE1, most drivers use CD_FRAMESIZE, but the optics storage driver uses
OPT BLOCKSIZE instead (both have the numerical value 2048).
</P>
<TABLE>
<TR><TD>
CDROMREADCOOKED
</TD><TD>
char [CD_FRAMESIZE]
</TD></TR><TR><TD>
CDROMREADMODE1
</TD><TD>
char [CD_FRAMESIZE or OPT_BLOCKSIZE]
</TD></TR><TR><TD>
CDROMREADMODE2
</TD><TD>
char [CD_FRAMESIZE_RAW0]
</TD></TR><TR><TD>
CDROMREADRAW
</TD><TD>
char [CD_FRAMESIZE_RAW]
</TD></TR></TABLE>
<P>EQL_ENSLAVE, EQL_EMANCIPATE, EQL_GETSLAVECFG, EQL_SETSLAVECFG, EQL_GETMASTERCFG, and
EQL_SETMASTERCFG take a structifreq *. The ifr data field is a pointer to another structure as follows:
</P>
<TABLE>
<TR><TD>
EQL_ENSLAVE
</TD><TD>
const struct slaving_request *
</TD></TR><TR><TD>
EQL_EMANCIPATE
</TD><TD>
const struct slaving_request *
</TD></TR><TR><TD>
EQL_GETSLAVECFG
</TD><TD>
struct slave_config * // I-O
</TD></TR><TR><TD>
EQL_SETSLAVECFG
</TD><TD>
const struct slave_config *
</TD></TR><TR><TD>
EQL_GETMASTERCFG
</TD><TD>
struct master_config *
</TD></TR><TR><TD>
EQL_SETMASTERCFG
</TD><TD>
const struct master_config *
</TD></TR></TABLE>
<P>FDRAWCMD takes a struct floppy raw cmd *. If flags & FD RAW
WRITE is nonzero, then data points to an input buffer of
length length. If flags & FD RAW READ is nonzero, then
data points to an output buffer of length length.
</P>
<P>GIO_FONTX and PIO_FONTX take a struct console font desc
* or a const struct console_font_desc *, respectively.
chardata points to a buffer of char [charcount]. This is an output buffer for
GIO_FONTX and an input buffer for PIO_FONTX.
</P>
<P>GIO_UNIMAP and PIO_UNIMAP take a struct unimapdesc
* or a const struct unimapdesc *, respectively.
entries points to a buffer of struct unipair [entry
ct]. This is an output buffer for GIO_UNIMAP and an input buffer for
PIO_UNIMAP.
</P>
<P>KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to I/O ports. They are essentially alternate interfaces
to ioperm.
</P>
<P>KDMAPDISP and KDUNMAPDISP enable or disable memory mappings or I/O port access. They are not implemented in the kernel.
</P>
<P>SCSI_IOCTL_PROBE_HOST takes an input pointer const int
*, which is a length. It uses the same pointer as an output pointer
to a char [] buffer of this length.
</P>
<P>SIOCADDRT and SIOCDELRT take an input pointer whose type depends on the protocol:
</P>
<TABLE>
<TR><TD>
Most protocols
</TD><TD>
const struct rtentry *
</TD></TR><TR><TD>
AX.25
</TD><TD>
const struct ax25_route *
</TD></TR><TR><TD>
NET/ROM
</TD><TD>
const struct nr_route_struct *
</TD></TR></TABLE>
<P>SIOCGIFCONF takes a struct ifconf *. The ifc
buf field points to a buffer of length ifc len bytes, into which the kernel
writes a list of type struct ifreq [].
</P>
<P>SIOCSIFHWADDR takes an input pointer whose type depends on the protocol:
</P>
<TABLE>
<TR><TD>
Most protocols
</TD><TD>
const struct ifreq *
</TD></TR><TR><TD>
AX.25
</TD><TD>
const char [AX25_ADDR_LEN]
</TD></TR></TABLE>
<P>TIOCLINUX takes a const char *. It uses this to distinguish several independent subcases. In the following table,
N + foo means foo after an N-byte pad. struct
selection is implicitly defined in
drivers/char/selection.c:
</P>
<A NAME="PAGENUM-788"><P>Page 788</P></A>
<TABLE>
<TR><TD>
TIOCLINUX-2
</TD><TD>
1 + const struct selection *
</TD></TR><TR><TD>
TIOCLINUX-3
</TD><TD>
void
</TD></TR><TR><TD>
TIOCLINUX-4
</TD><TD>
void
</TD></TR><TR><TD>
TIOCLINUX-5
</TD><TD>
4 + const struct f long [8]; g *
</TD></TR><TR><TD>
TIOCLINUX-6
</TD><TD>
char *
</TD></TR><TR><TD>
TIOCLINUX-7
</TD><TD>
char *
</TD></TR><TR><TD>
TIOCLINUX-10
</TD><TD>
1 + const char *
</TD></TR></TABLE>
<P><B>
DUPLICATE ICOTLS
</B></P>
<P>This list does not include ioctls in the range
SIOCDEVPRIVATE and SIOCPROTOPRIVATE:
<TABLE>
<TR><TD>
0x00000001
</TD><TD>
FDSETPRM
</TD><TD>
FIBMAP
</TD></TR><TR><TD>
0x00000002
</TD><TD>
FDDEFPRM
</TD><TD>
FIGETBSZ
</TD></TR><TR><TD>
0x00005382
</TD><TD>
CDROMAUDIOBUFSIZ
</TD><TD>
SCSI_IOCTL_GET_IDLUN
</TD></TR><TR><TD>
0x00005402
</TD><TD>
SNDCTL_TMR_START
</TD><TD>
TCSETS
</TD></TR><TR><TD>
0x00005403
</TD><TD>
SNDCTL_TMR_STOP
</TD><TD>
TCSETSW
</TD></TR><TR><TD>
0x00005404
</TD><TD>
SNDCTL_TMR_CONTINUE
</TD><TD>
TCSETSF
</TD></TR></TABLE>
<P>Linux, 17 September 1995
</P>
<H3><A NAME="ch02_ 47">
ioperm
</A></H3>
<P>ioperm—Sets port input/output permissions
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
#include <unistd.h>
int ioperm(unsigned long from, unsigned long num,intturn_on);
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>ioperm sets the port access permission bits for the process for
num bytes starting from port address from to the value
turn_on. The use of ioperm requires root privileges.
</P>
<P>Only the first 0¥3ff I/O ports can be specified in this manner. For more ports, the
iopl function must be used. Permissions are not inherited on
fork, but on exec they are. This is useful for giving port access permissions to nonprivileged tasks.
</P>
<P><B>
RETURN VALUE
</B></P>
<P>On success, 0 is returned. On error, _1 is returned and
errno is set appropriately.
</P>
<P><B>
CONFORMS TO
</B></P>
<P>ioperm is Linux specific.
</P>
<P><B>
SEE ALSO
</B></P>
<!-- CODE SNIP //-->
<PRE>
iopl(2)
</PRE>
<!-- END CODE SNIP //-->
<P>Linux, 21 January 1993
</P>
<H3><A NAME="ch02_ 48">
iopl
</A></H3>
<P>iopl—Changes I/O privilege level
</P>
<P><CENTER>
<a href="0781-0784.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0000-0000.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -