From 9e070b35d19c92ebc9874b8d08253a6c1dc544cb Mon Sep 17 00:00:00 2001 From: twoneis Date: Tue, 25 Mar 2025 16:48:26 +0100 Subject: [PATCH] try fix --- code/lkm.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/code/lkm.c b/code/lkm.c index cb9563848..207690c23 100644 --- a/code/lkm.c +++ b/code/lkm.c @@ -12,9 +12,6 @@ int lkm_open(struct inode *, struct file *); int lkm_release(struct inode *, struct file *); long lkm_ioctl(struct file *, unsigned int, long unsigend int); -module_init(lkm_init); -module_exit(lkm_exit); - static struct file_operations lkm_fops = { .owner = "", .open = lkm_open, @@ -22,11 +19,6 @@ static struct file_operations lkm_fops = { .unlocked_ioctl = lkm_ioctl, }; -MODULE_AUTHOR("Mira Chacku Purakal"); -MODULE_DESCRIPTION("Generic Module"); -MODULE_VERSION("0.1"); -MODULE_LICENSE("GPL"); - static int lkm_init(void) { @@ -60,8 +52,13 @@ lkm_release(struct inode *inode, struct file *fp) printk(KERN_INFO "lkm: release: start") } -long -lkm_ioctl(struct file *fp, unsigned int num, long unsigned int param) -{ - printk(KERN_INFO "lkm: release: start") -} +long lkm_ioctl(struct file *fp, unsigned int num, + long unsigned int param) { printk(KERN_INFO "lkm: release: start") } + +MODULE_AUTHOR("Mira Chacku Purakal"); +MODULE_DESCRIPTION("Generic Module"); +MODULE_VERSION("0.1"); +MODULE_LICENSE("GPL"); + +module_init(lkm_init); +module_exit(lkm_exit);