函数的作用是:将特定于设备的命令dcmd发送给管理作为filedes打开的设备的进程。
Device-control commands设备控制命令
Use these macros to set up the device-control commands:使用这些宏设置设备控制命令:
__DIOF(class, cmd, data)//Get information from the device.从设备中获取信息。
__DION(class, cmd)//A command with no associated data.没有关联数据的命令。
__DIOT(class, cmd, data)//Pass information to the device.将信息传递给设备。
__DIOTF(class, cmd, data)//Pass some information to the device, and get some from it.向设备传递一些信息,并从中获取一些信息。
class:命令的主要类别。设备控制命令分为以下几个类,以方便组织:
_DCMD_ALL — Common (all I/O servers).
_DCMD_CAM — Low-level (Common Access Method) devices, such as disks or CD-ROMs.
_DCMD_CHR — Character devices.
_DCMD_FSYS, _DCMD_BLK — Filesystem/block I/O managers.
_DCMD_INPUT — Input devices.
_DCMD_IP — Internet Protocol.
_DCMD_MEM — Memory card.
_DCMD_MISC — Miscellaneous commands.
_DCMD_MIXER — Mixer (Audio).
_DCMD_NET — Network devices.