Skip to content

Instantly share code, notes, and snippets.

@rajatgupta1998
Created May 31, 2019 11:44
Show Gist options
  • Save rajatgupta1998/12b7a3a802410c14a097d6ce79d0cd37 to your computer and use it in GitHub Desktop.
Save rajatgupta1998/12b7a3a802410c14a097d6ce79d0cd37 to your computer and use it in GitHub Desktop.
custom kernel module
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk(KERN_INFO "Module was loaded successfully...\n");
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "Going away...\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment