dep2.c 479 B

123456789101112131415161718192021222324
  1. /* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-module-dependencies */
  2. #include <linux/debugfs.h>
  3. #include <linux/kernel.h>
  4. #include <linux/module.h>
  5. extern u32 lkmc_dep;
  6. static struct dentry *debugfs_file;
  7. static int myinit(void)
  8. {
  9. debugfs_file = debugfs_create_u32("lkmc_dep2", S_IRUSR | S_IWUSR, NULL, &lkmc_dep);
  10. return 0;
  11. }
  12. static void myexit(void)
  13. {
  14. debugfs_remove(debugfs_file);
  15. }
  16. module_init(myinit)
  17. module_exit(myexit)
  18. MODULE_LICENSE("GPL");