summaryrefslogtreecommitdiff
path: root/source/module/monitor_kernel.c
diff options
context:
space:
mode:
authorzy <[email protected]>2023-11-23 00:29:21 -0500
committerzy <[email protected]>2023-11-23 00:29:21 -0500
commitac287cdb63755329b2c74a055e41e7cc17cb2df8 (patch)
treea55936e2e62c83a0251390db324ac7d133fdb619 /source/module/monitor_kernel.c
parent1ba029a6b843b11bb1106d263ff2df8a7c98ed14 (diff)
123
Diffstat (limited to 'source/module/monitor_kernel.c')
-rw-r--r--source/module/monitor_kernel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/module/monitor_kernel.c b/source/module/monitor_kernel.c
index 0d59d0e..aa5754d 100644
--- a/source/module/monitor_kernel.c
+++ b/source/module/monitor_kernel.c
@@ -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: