As far as I know,
The Linux file system uses two types of virtual file systems to exchange information between user space and kernel space.
1) Proc file system
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
2) sysfs file system
https://en.wikipedia.org/wiki/Sysfs
In the linux kernel code, I see that some subsystem used the file procto perform such an exchange in the user space - kernelspace, and on some system the sysfs files were the same.
So, I just want to know if I am going to write a new module or Linux kernel driver, then how to choose virtual files? when should i use sysfsand when should i use a file proc?
Please let me know if I do not understand something.
source
share