X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fkernel.git;a=blobdiff_plain;f=hello%2Fhello-1.c;fp=hello%2Fhello-1.c;h=24bcea7d1e81c1c9588de21515db074fcc1c6d5e;hp=63c883d72609c2b9059d0953a929c9e4be4b6bf7;hb=09f7937cd0bb525f3a5d73d1c9eeab92ff6e22f7;hpb=03c307fe6b73ddf913a16e30c517c25bfa91a2f4 diff --git a/hello/hello-1.c b/hello/hello-1.c index 63c883d..24bcea7 100644 --- a/hello/hello-1.c +++ b/hello/hello-1.c @@ -2,5 +2,25 @@ #include #include +#include +#include "../general.h" +int my_init(void) +{ + printk(KERN_ALERT "module loaded\n"); + printk("KERN_ALERT " + return 0; +} + +void my_cleanup(void) +{ + printk(KERN_ALERT "module unloaded\n"); +} + +module_init(my_init); +module_exit(my_cleanup); + +MODULE_AUTHOR(ME_THE_AUTHOR); +MODULE_DESCRIPTION("bullshit ;)"); +MODULE_LICENSE("GPL");