diff options
Diffstat (limited to '3 Resources/Linux/Device drivers.md')
-rw-r--r-- | 3 Resources/Linux/Device drivers.md | 22 |
1 files changed, 22 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..95f1a75 --- /dev/null +++ b/3 Resources/Linux/Device drivers.md @@ -0,0 +1,22 @@ +#linux #devices + +--- +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 |