Skip to content

Instantly share code, notes, and snippets.

@md-jamal
Created May 5, 2019 04:25
Show Gist options
  • Save md-jamal/16d2e1afd60978d8095aa38e7e37fb5f to your computer and use it in GitHub Desktop.
Save md-jamal/16d2e1afd60978d8095aa38e7e37fb5f to your computer and use it in GitHub Desktop.
#include <linux/module.h> /* for MODULE_* */
#include <linux/printk.h> /* for pr_info */
static int __init mod_init(void)
{
if (request_module("crc7") > 0)
pr_info("request_module failed to load\n");
else
pr_info("request_module loaded successfully\n");
return 0;
}
static void __exit mod_exit(void)
{
}
module_init(mod_init);
module_exit(mod_exit);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment