Listing 1. The ioctl structure.
清单1.ioctl结构。
The ioctl command works like so.
ioctl命令的工作原理如下。
Structures used with ioctl commands.
ioctl命令所使用的结构。
Working with ioctl socket control options.
使用ioctl套接字控制选项。
Listing 1 demonstrates the structure of ioctl.
清单1给出了ioctl的结构。
The ioctl command returns the following codes.
ioctl命令返回下面的代码。
Fill the input structure for ioctl INTR_SIMULATE.
为ioctl INTR_SIMULATE填充输入结构。
The ioctl function here requires three parameters.
这里的ioctl函数必须具有3个参数。
Call the ioctl function to execute the SCSI command.
调用ioctl函数执行scsi命令。
See Resources for the complete list of ioctl commands.
有关ioctl命令的完整列表,请参见参考资料部分。
This ioctl can be used in the FVT test application code.
这个ioctl可以在FVT测试应用程序代码中使用。
DeviceIoControl requires more parameters than ioctl does.
deviceiocontrol比ioctl需要更多的参数。
This ioctl interface is meant for our hypothetical driver.
这个ioctl接口对于我们假想的驱动程序来说意义重大。
Execute ioctl requests as instructed by the colinux-daemon process.
根据colinux - daemon进程的要求执行ioctl请求。
That value is returned from the ioctl call and the user thread must react to that.
这个值是从ioctl调用中返回的,用户线程必须对此进行响应。
The special ioctl function INTR_SIMULATE needs to be called to simulate the interrupts.
需要调用这个特殊的ioctl函数INTR_SIMULATE来模拟中断。
This ioctl() call is responsible for doing context switches between guest OS and host OS.
这个ioctl()调用负责进行客户OS与宿主 OS之间的上下文切换。
The I/O control (ioctl) function calls manipulate underlying device parameters of special files.
I/O控制 (ioctl)函数调用可以用来对特殊文件的基础设备参数进行操作。
These ioctl commands are used to query the state of an interface and to manipulate its properties.
这些ioctl命令用于查询接口的状态并对其属性进行操作。
Currently, file system freezing is achieved through an ioctl with an argument of FIFREEZE or FITHAW.
目前,文件系统冻结是通过具有参数FIFREEZE或FITHAW的ioctl来实现的。
Unlike the corresponding system call DeviceIOControl, the input parameter list in ioctl is not fixed.
与对应的系统调用DeviceIOControl不同,ioctl的输入参数列表并不固定。
Listing 6 shows that the ioctl call caused the MKFS program that was used to format a partition to fail.
清单6显示ioctl调用导致用来格式化分区的mkfs程序失败。
Before proceeding further, I will describe an ioctl interface that you will be using in the two approaches.
在继续之前,我们首先来讨论一下在这两种方法中都会使用的ioctl接口。
The blocking functionality is achieved by making use of sleep_on_interruptible inside the driver's ioctl function.
这种阻塞功能是利用驱动程序的ioctl函数中的 sleep_on_interruptible 实现的。
A new ioctl command should be added to the device driver to control the interrupt simulation from the test application.
ioctl命令应该添加到设备驱动程序中,这样就可以从测试应用程序中控制对中断的模拟了。
When executed, the user-space program does an ioctl on pre-defined proc-entries, which results in a call to the kernel module.
这个用户空间程序在预定义的proc -entries上执行ioctl,这会导致对内核模块的调用。
The listings below show some of the most important structures that are frequently used while working with ioctl socket commands.
下面的清单介绍了一些最重要的结构,使用ioctl套接字命令时常常用到这些结构。
A separate ioctl command should be introduced to have control over interrupt simulation (see the section on the ioctl interface).
我们应该使用一个单独的ioctl命令来对中断模拟进行控制(请参阅ioctl接口一节的内容)。
When the kernel module receives an ioctl request, it first, creates a session keyring, by calling key_alloc to allocate a new key.
当内核模块收到ioctl请求时,它首先调用key_alloc来分配一个新的密钥,从而创建一个会话keyring。
When the kernel module receives an ioctl request, it first, creates a session keyring, by calling key_alloc to allocate a new key.
当内核模块收到ioctl请求时,它首先调用key_alloc来分配一个新的密钥,从而创建一个会话keyring。
应用推荐