diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-01-08 10:48:09 +0100 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-01-08 10:48:09 +0100 |
commit | ed0753ad224f0c65133bd7a63180257eecd9f5e3 (patch) | |
tree | cc662868574fe17db58be9e0faadd452c84dc59c /3 resources/linux/device-drivers.md | |
parent | 493be30dc981eaf762a95a1218f96893b1976727 (diff) |
vault backup: 2025-01-08 10:48:09
Diffstat (limited to '3 resources/linux/device-drivers.md')
-rw-r--r-- | 3 resources/linux/device-drivers.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/3 resources/linux/device-drivers.md b/3 resources/linux/device-drivers.md new file mode 100644 index 0000000..e4fe9d2 --- /dev/null +++ b/3 resources/linux/device-drivers.md @@ -0,0 +1,19 @@ +major, minor numbers +major = driver (used by kernel when opening device to dispatch to correct driver) +minor = used by driver to differentiate device(s) + +after disk the major, minor numbers are shown: +``` +[jasras@n04.compute.vps2-lej1 ~]$ ls -l /dev/dm-* +brw-rw---- 1 root disk 253, 0 Oct 25 10:10 /dev/dm-0 +brw-rw---- 1 root disk 253, 1 Oct 25 10:11 /dev/dm-1 +brw-rw---- 1 root root 253, 11 Oct 28 19:58 /dev/dm-11 +brw-rw---- 1 root root 253, 12 Oct 28 19:58 /dev/dm-12 +``` + +available devices: `cat /proc/devices` + +character devices vs block devices; what is the difference? + +--- +[oreilly-device-drivers](https://www.oreilly.com/library/view/linux-device-drivers/0596000081/ch03s02.html)
\ No newline at end of file |