title: How to read a string from a sysfs attribute file a Linux kernel module?
body: <p>Basically, I want to have a configuration file, e.g. "myconfigfile" that contains a string of characters, for example "abcdefg".</p>
  
  <p>I want to read this string in as a value in my kernel module. That is, I want to have a <code>char*</code> in my code that gets the value "abcdefg" from that file. From what I understand, I should use sysfs. Here are my questions:</p>
  
  <ol>
  <li>Do I just create the file and move it into <code>/sys/module/path/to/my/module</code> directory ?</li>
  <li>If I have the file available, how exactly do I read the value? Say the file is called "myconfigfile". I read <a href="http://users.sosdg.org/~qiyong/lxr/source/Documentation/filesystems/sysfs.txt" rel="nofollow">this documentation</a> but frankly, I don't understand it.</li>
  </ol>