init && exit

This commit is contained in:
zy
2023-11-16 21:08:27 -05:00
parent d0c662d181
commit 6397e0da75
5 changed files with 39 additions and 29 deletions

View File

@@ -64,7 +64,7 @@ static struct file_operations fops = {
};
int init_module(void) {
printk(KERN_INFO "%s\n", __FUNCTION__);
printk(KERN_INFO "variable_monitor fun: %s\n", __FUNCTION__);
if (alloc_chrdev_region(&dev_num, 0, 1, DEVICE_NAME) < 0) {
printk(KERN_ALERT "Failed to register device number\n");
return -1;
@@ -110,7 +110,7 @@ int init_module(void) {
}
void cleanup_module(void) {
printk(KERN_INFO "%s\n", __FUNCTION__);
printk(KERN_INFO "variable_monitor fun: %s\n", __FUNCTION__);
// clear all watch | free buffer
monitor_exit();