lkmpg
lkmpg copied to clipboard
Little introduction to debugfs
I write a little introduction to debugfs
quote from Kernel documentation :
"Debugfs exists as a simple way for kernel developers to make information available to user space. Unlike /proc, which is only meant for information about a process, or sysfs, which has strict one-value-per-file rules, debugfs has no rules at all. Developers can put any information they want there. The debugfs filesystem is also intended to not serve as a stable ABI to user space; in theory, there are no stability constraints placed on files exported there. The real world is not always so simple, though [1]; even debugfs interfaces are best designed with the idea that they will need to be maintained forever."
in attachment 3 files :
debugfs_par.txt: the text of the introductionkparm_debugfs.txt: a very simple examplekparm_debugfs_file.txt: Another example, more complex shows you how to create a file in the most general way (withdebugfs_create_file) and a blob.