An introduction to Linux Device Drivers - #1
Today we’ll be discussing a basic c code, the famous hello.c, which will be loaded as a kernel module and discuss some of the basic aspects related to it. #include <linux/init.h> #include <linux/module.h> MODULE_LICENSE (“GPL”); // included in module.h, tells about the license the code is having. static int __init hello_init (void) { printk (KERN_ALERT “Hello, worldn”); return 0; } static void __exit hello_exit (void) { printk (KERN_ALERT “Goodbyen”); }...