This commit is contained in:
zy
2023-11-23 00:29:21 -05:00
parent 1ba029a6b8
commit ac287cdb63
5 changed files with 85 additions and 5 deletions

View File

@@ -47,6 +47,8 @@ static long device_ioctl(struct file *file, unsigned int ioctl_num,
int ret = 0;
watch_arg warg;
ioctl_dump_param dump_param;
int wpid;
printk(KERN_INFO "variable_monitor fun: %s with ioctl_num %d\n", __FUNCTION__,
ioctl_num);
@@ -79,7 +81,11 @@ static long device_ioctl(struct file *file, unsigned int ioctl_num,
// printk(KERN_INFO "ret %d, %lu\n", ret, dump_param.user_buf_len);
}
printk(KERN_INFO "copy_to_user \n");
break;
case 2:
printk(KERN_INFO "variable_monitor test 2\n");
ret = copy_from_user(&wpid, (int *)ioctl_param, sizeof(int));
diag_test(wpid);
/* code */
break;
default: