不能用open、creat、read、write、pread、pwrite、lseek、close、dup、dup2、sysnc、fsync、fdatasync和fcntl这些通用函数进行的I/O操作,一般都要考虑用ioctl来操作。
函数原型:
#include <unistd.h>
#include <sys/ioctl.h>
#include <stropts.h>
int ioctl(int filedes, int request, ...);
不能用open、creat、read、write、pread、pwrite、lseek、close、dup、dup2、sysnc、fsync、fdatasync和fcntl这些通用函数进行的I/O操作,一般都要考虑用ioctl来操作。
函数原型:
#include <unistd.h>
#include <sys/ioctl.h>
#include <stropts.h>
int ioctl(int filedes, int request, ...);