mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 03:01:36 +01:00
This commit is contained in:
@@ -459,6 +459,27 @@ pre{ white-space:pre }
|
||||
<div class="sect3">
|
||||
<h4 id="seq-file"><a class="anchor" href="#seq-file"></a><a class="link" href="#seq-file">17.8.2. seq_file</a></h4>
|
||||
<div class="paragraph">
|
||||
<p>TODO these examples broke in kernel 5.0 and we didn’t notice because they just added a flimsy warning and nothing else:</p>
|
||||
</div>
|
||||
<div class="ulist">
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="https://stackoverflow.com/questions/25399112/how-to-use-a-seq-file-in-linux-kernel-modules/45100058" class="bare">https://stackoverflow.com/questions/25399112/how-to-use-a-seq-file-in-linux-kernel-modules/45100058</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="https://stackoverflow.com/questions/60570242/seq-file-not-working-properly-after-next-returns-null" class="bare">https://stackoverflow.com/questions/60570242/seq-file-not-working-properly-after-next-returns-null</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Fix with ifdef for kernel 4/5. The error message is:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>seq_file: buggy .next function next [module-name] did not update position index</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Writing trivial read <a href="file-operations.html">File operations</a> is repetitive and error prone. The <code>seq_file</code> API makes the process much easier for those trivial cases:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
|
||||
Reference in New Issue
Block a user