Ciro Santilli
2018-07-06 09:26:42 +01:00
parent 59960b808c
commit 9b4c1984fc

View File

@@ -3687,12 +3687,13 @@ Sources:
Bibliography: https://stackoverflow.com/questions/5970595/how-to-create-a-device-node-from-the-init-module-code-of-a-linux-kernel-module/45531867#45531867
=== Pseudo files
==== File operations
File operations are the main method of userland driver communication. `struct file_operations` determines what the kernel will do on filesystem system calls of <<pseudo-filesystems>>:
File operations are the main method of userland driver communication. `struct file_operations` determines what the kernel will do on filesystem system calls of <<pseudo-filesystems>>.
This example illustrates the most basic system calls: `open`, `read`, `write`, `close` and `lseek`:
....
/fops.sh
@@ -3919,7 +3920,7 @@ This example gets an anonymous inode via <<ioctl>> from a debugfs entry by using
Reads to that inode return the sequence: `1`, `10`, `100`, ... `10000000`, `1`, `100`, ...
Bibliography: https://stackoverflow.com/questions/4508998/what-is-an-anonymous-inode-in-linux
Bibliography: https://stackoverflow.com/questions/4508998/what-is-an-anonymous-inode-in-linux/44388030#44388030
==== netlink sockets