diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-04-23 12:34:52 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-04-24 17:57:32 -0400 |
commit | 22c36d18c668db1a8d92a9a47e09857974f6a49b (patch) | |
tree | 417f085e0c488aee5fd323c15e99bbc46f00f78a /Documentation/filesystems/seq_file.txt | |
parent | b69d3987f4360a5e7e9e55465b3cdd0cc204b79e (diff) |
Document SEQ_SKIP
2.6.26 adds a SEQ_SKIP return value for the seq_file show() function;
update the documentation to match.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/filesystems/seq_file.txt')
-rw-r--r-- | Documentation/filesystems/seq_file.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt index 7fb8e6dc62bf..0ab92c260894 100644 --- a/Documentation/filesystems/seq_file.txt +++ b/Documentation/filesystems/seq_file.txt | |||
@@ -122,8 +122,7 @@ stop() is the place to free it. | |||
122 | } | 122 | } |
123 | 123 | ||
124 | Finally, the show() function should format the object currently pointed to | 124 | Finally, the show() function should format the object currently pointed to |
125 | by the iterator for output. It should return zero, or an error code if | 125 | by the iterator for output. The example module's show() function is: |
126 | something goes wrong. The example module's show() function is: | ||
127 | 126 | ||
128 | static int ct_seq_show(struct seq_file *s, void *v) | 127 | static int ct_seq_show(struct seq_file *s, void *v) |
129 | { | 128 | { |
@@ -132,6 +131,12 @@ something goes wrong. The example module's show() function is: | |||
132 | return 0; | 131 | return 0; |
133 | } | 132 | } |
134 | 133 | ||
134 | If all is well, the show() function should return zero. A negative error | ||
135 | code in the usual manner indicates that something went wrong; it will be | ||
136 | passed back to user space. This function can also return SEQ_SKIP, which | ||
137 | causes the current item to be skipped; if the show() function has already | ||
138 | generated output before returning SEQ_SKIP, that output will be dropped. | ||
139 | |||
135 | We will look at seq_printf() in a moment. But first, the definition of the | 140 | We will look at seq_printf() in a moment. But first, the definition of the |
136 | seq_file iterator is finished by creating a seq_operations structure with | 141 | seq_file iterator is finished by creating a seq_operations structure with |
137 | the four functions we have just defined: | 142 | the four functions we have just defined: |