core_param的使用

来源:互联网 发布:澳门航空怎么样 知乎 编辑:程序博客网 时间:2024/05/16 05:43
/** * core_param - define a historical core kernel parameter. * @name: the name of the cmdline and sysfs parameter (often the same as var) * @var: the variable * @type: the type of the parameter * @perm: visibility in sysfs * * core_param is just like module_param(), but cannot be modular and * doesn't add a prefix (such as "printk.").  This is for compatibility * with __setup(), and it makes sense as truly core parameters aren't * tied to the particular file they're in. */#define core_param(name, var, type, perm)\param_check_##type(name, &(var));\__module_param_call("", name, ¶m_ops_##type, &var, perm, -1)#endif /* !MODULE */
在串口终端可以通过echo /sys/module/kernel/parameters/** 对该变量进行赋值。


0 0
原创粉丝点击