课程: Advanced Linux: The Linux Kernel (2020)

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Examine kernel driver source

Examine kernel driver source

- [Instructor] Let's now talk about drivers, device drivers the source code for drivers in the Linux Kernel. So, there is a subdirectory called Drivers and there's lots of subdirectories as the drivers are organized in the different sort of categories. For example there is a subdirectory called net for network drivers, and there's a subdirectory underneath net called ethernet, for ethernet drivers. There are lots of ethernet device drivers for example in the Linux Kernel. Another subdirectory underneath Drivers is the char subdirectory for character drivers including the driver mem.c that includes the functions for working with the device file dev null. For example, in the character subdirectory you will find the file mem.c and in that file you will find the function read underscore null which is the function called when you read dev null, and you can see all it does is return zero, how long did it take to write that…

内容