没有MODULE_LICENSE(“GPL”);内核没抱怨呀?

袁保康 2013-02-12 05:00:29
就是ldd3上的hello world模块程序,都说没有MODULE_LICENSE(“GPL”);在insmod时内核会抱怨,但是我的打印信息如下:


(说明,我用的内核版本为3.7.0的)
...全文
761 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
袁保康 2014-10-31
  • 打赏
  • 举报
回复
引用 5 楼 CrazyCoder8848 的回复:
见2.6的内核,kernel/Module.c static void set_license(struct module *mod, const char *license) { if (!license) license = "unspecified"; if (!license_is_gpl_compatible(license)) { if (!test_taint(TAINT_PROPRIETARY_MODULE)) printk(KERN_WARNING "%s: module license '%s' taints " "kernel.\n", mod->name, license); add_taint_module(mod, TAINT_PROPRIETARY_MODULE); } }
感谢,那时的我还不太懂得去看内核源码。
无忧老猪 2014-10-31
  • 打赏
  • 举报
回复
见2.6的内核,kernel/Module.c static void set_license(struct module *mod, const char *license) { if (!license) license = "unspecified"; if (!license_is_gpl_compatible(license)) { if (!test_taint(TAINT_PROPRIETARY_MODULE)) printk(KERN_WARNING "%s: module license '%s' taints " "kernel.\n", mod->name, license); add_taint_module(mod, TAINT_PROPRIETARY_MODULE); } }
morris88 2013-02-26
  • 打赏
  • 举报
回复
到2.6下看看抱怨吧
袁保康 2013-02-12
  • 打赏
  • 举报
回复
我是初学者只是想验证一下,看看内核抱怨是什么样的。
袁保康 2013-02-12
  • 打赏
  • 举报
回复
代码如下:
袁保康 2013-02-12
  • 打赏
  • 举报
回复
大牛们能来说点什么吗?

4,465

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧