From the course: Advanced Linux: The Linux Kernel
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Solution: Drivers and device files - Linux Tutorial
From the course: Advanced Linux: The Linux Kernel
Solution: Drivers and device files
(upbeat music begins) - [Instructor] Some fun with Dev Null, everybody's favorite device file, I think. Let's start out by looking at the file dev null and finding the major number, and it's number one. All righty, it's also minor number three, but let's see all the other device files, major number one. So let's look in Dev and we're going to grep space one comma space. And we check to make sure we're looking at only character device files. There's any B's in there, they could also be a one, but they would be a block driver, not a character driver. So that'd be a different device driver. But all these are C, they're all one. So these are all implemented, turns out, by the same driver. Now, for other sorts of major minor numbers, it might be possible that different minor numbers are implemented by different drivers, but for number one, it's the same driver. It's the memory driver. And notice that dev null everybody has write access to. Makes sense, right? Because you're always doing…
Contents
-
-
-
Discover and control hardware5m 55s
-
(Locked)
Challenge: Hardware26s
-
(Locked)
Solution: Hardware1m 32s
-
(Locked)
System calls in-depth4m 30s
-
(Locked)
Challenge: System calls (syscalls)1m 51s
-
(Locked)
Solution: System calls (syscalls)4m 45s
-
(Locked)
Read messages from the kernel and /proc3m 34s
-
(Locked)
Challenge: kernel messages and proc1m 12s
-
(Locked)
Solution: kernel messages and proc2m 19s
-
(Locked)
Introduction to /sys2m 30s
-
(Locked)
Challenge: sysfs1m 17s
-
Solution: sysfs3m 38s
-
(Locked)
Device drivers and device files4m 17s
-
(Locked)
Challenge: Drivers and device files44s
-
(Locked)
Solution: Drivers and device files2m 47s
-
-
-
-
-
-