Basically, I want to have a configuration file, e.g. "myconfigfile" that contains a string of characters, for example "abcdefg".
I want to read this string in as a value in my kernel module. That is, I want to have a char* in my code that gets the value "abcdefg" from that file. From what I understand, I should use sysfs. Here are my questions:
- Do I just create the file and move it into
/sys/module/path/to/my/moduledirectory ? - If I have the file available, how exactly do I read the value? Say the file is called "myconfigfile". I read this documentation but frankly, I don't understand it.