默默的一块石头
发布时间:2019-11-01 17:31:41
int main(int argc, char *argv[]) { _cleanup_free_ char *cgroup = null; int fd_ctrl = -1, fd_uevent = -1; int r; r = parse_argv(.........
发布时间:2019-11-01 17:30:22
int bus_match(struct device *dev, struct device_driver *drv);int bus_match(struct device *dev, struct device_driver *drv){ const struct of_device_id * pof_match_table = drv->of_match_table; struct device * pdev; for (pof_match_table; pof_match_table->name[0]; po.........
发布时间:2019-10-22 20:32:26
struct device devicesy = { .init_name = "devicesy", };static struct class *char_dev_class; char_dev_class = class_create(this_module,"devicesy_class");//creat "devicesy_class" file in /sys/class/devicesy_class if (is_err(char_dev_class.........
发布时间:2019-10-16 19:25:24
#include linux/module.h#include linux/init.h#include linux/kobject.h#include linux/kernel.hstatic struct kobject *devicessy_kobj;static struct kobject *kobj;static ssize_t devicessy_attr_show(struct kobject *kobj, struct attribute *attr,char *buf){ struct textattribute * test;.........