📄 test.c
字号:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include "ioctl-drv.h"
int main( int argc, char *argv[] )
{
int DeviceHandle = -1;
if((DeviceHandle=open("/dev/ioctl", O_RDWR )) <= 0 )
{
printf("Open ioctl device is failed! \n");
return 0;
}
ioctl(DeviceHandle, IOCTL_TEST1, &argv[1], NULL);
ioctl(DeviceHandle, IOCTL_TEST2, &argv[1], NULL);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -