diff --git a/LKMPG-3.16.html b/LKMPG-3.16.html index cc4d131..b8979f5 100644 --- a/LKMPG-3.16.html +++ b/LKMPG-3.16.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + The Linux Kernel Module Programming Guide @@ -2423,23 +2423,23 @@ BE CARREFUL: when a sequence is finished, another one starts. That means that at

Figure: How seq_file works

+ +
+

seq_file.png +

+
+ --- - - - - - -
seq_file.jpg
Seq_file provides basic functions for file_operations, as seq_read, seq_lseek, and some others. But nothing to write in the /proc file. Of course, you can still use the same way as in the previous example.
+

+Seq_file provides basic functions for file_operations, as seq_read, seq_lseek, and some others. But nothing to write in the /proc file. Of course, you can still use the same way as in the previous example. +

diff --git a/LKMPG-3.16.org b/LKMPG-3.16.org index ae315e9..2bc91f0 100644 --- a/LKMPG-3.16.org +++ b/LKMPG-3.16.org @@ -1490,9 +1490,25 @@ BE CARREFUL: when a sequence is finished, another one starts. That means that at *** Figure: How seq_file works -| [[./seq_file.jpg]] | -|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Seq_file provides basic functions for file_operations, as seq_read, seq_lseek, and some others. But nothing to write in the /proc file. Of course, you can still use the same way as in the previous example. | +#+BEGIN_SRC dot :file img/seq_file.png +digraph seq_file { + yesnull [label="Yes" border=0]; + returnnull1 [label="return is NULL?" shape=diamond]; + returnnull2 [label="return is NULL?" shape=diamond]; + start [label="start() treatment" shape=box]; + next [label="next() treatment" shape=box]; + stop [label="stop() treatment" shape=box]; + start -> returnnull1; + returnnull1 -> next [label="No"]; + returnnull1 -> yesnull; + next -> returnnull2; + returnnull2 -> next [label="No"]; + returnnull2 -> stop [label="Yes"]; + stop -> start; +} +#+END_SRC + | +Seq_file provides basic functions for file_operations, as seq_read, seq_lseek, and some others. But nothing to write in the /proc file. Of course, you can still use the same way as in the previous example. *** Example: procfs4.c #+BEGIN_SRC c diff --git a/img/seq_file.png b/img/seq_file.png new file mode 100644 index 0000000..c957b1f Binary files /dev/null and b/img/seq_file.png differ diff --git a/seq_file.jpg b/seq_file.jpg deleted file mode 100644 index 4a6976b..0000000 Binary files a/seq_file.jpg and /dev/null differ