1
0

hello-1.c 397 B

1234567891011121314151617181920
  1. /*
  2. * hello-1.c - The simplest kernel module.
  3. */
  4. #include <linux/module.h> /* Needed by all modules */
  5. #include <linux/printk.h> /* Needed for pr_info() */
  6. int init_module(void)
  7. {
  8. pr_info("Hello world 1.\n");
  9. /* A non 0 return means init_module failed; module can't be loaded. */
  10. return 0;
  11. }
  12. void cleanup_module(void)
  13. {
  14. pr_info("Goodbye world 1.\n");
  15. }
  16. MODULE_LICENSE("GPL");