|
|
1 жил өмнө | |
|---|---|---|
| .. | ||
| charDevice.c | 1 жил өмнө | |
| img.png | 1 жил өмнө | |
| readme.md | 1 жил өмнө | |
注册字符驱动。但是不自动挂载。
lsmod charDevice.ko
mknod /dev/charDevice3 c 200 0
cat /dev/charDevice
Linux has always enforced device file identification by a unique identifier, composed of
two parts, a major and a minor.
enforce 强制 identification 标识 a unique identifier 一种唯一标识符 composed of two parts 由两个部分组成 a major and a minor 主设备号和次设备号~~~~ 这个是个整形数,由主次设备号组成 the preceding excerpt 前面的摘录 excerpt 摘录 英 / ˈeksɜːpt
Character device data structure introduction 字符设备数据结构体介绍 struct cdev {
struct kobject kobj;
struct module *owner;
const struct file_operations *ops;
dev_t dev;
[...]
};