Advertisement
Guest User

Untitled

a guest
Oct 29th, 2012
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. /*
  2. * hello−1.c − The simplest kernel module.
  3. */
  4. #include <linux/module.h>
  5. /* Needed by all modules */
  6. #include <linux/kernel.h>
  7. /* Needed for KERN_INFO */
  8. int init_module(void)
  9. {
  10. printk(KERN_INFO "Hello world 1.\n");
  11. /*
  12. * A non 0 return means init_module failed; module can't be loaded.
  13. */
  14. return 0;
  15. }
  16. void cleanup_module(void)
  17. {
  18. printk(KERN_INFO "Goodbye world 1.\n");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement