hello.c 238 B

123456789101112131415161718
  1. #include <linux/module.h>
  2. #include <linux/kernel.h>
  3. static int myinit(void)
  4. {
  5. pr_info("hello init\n");
  6. return 0;
  7. }
  8. static void myexit(void)
  9. {
  10. pr_info("hello exit\n");
  11. }
  12. module_init(myinit)
  13. module_exit(myexit)
  14. MODULE_LICENSE("GPL");