diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-28 00:46:41 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-21 23:14:02 -0400 |
commit | 521b5d0c40386f4a9805cdec7bd979fc96a86aeb (patch) | |
tree | 2193c12ee3dc0551790c79370603acb57e0f59e7 /include/linux/seq_file.h | |
parent | 4e1b36fb485dd81b0818ef1bc8fb5c0f2923a283 (diff) |
[PATCH] teach seq_file to discard entries
Allow ->show() return SEQ_SKIP; that will discard all
output from that element and move on.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/seq_file.h')
-rw-r--r-- | include/linux/seq_file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 1da1e6208a0a..d65796dc26d9 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -30,6 +30,8 @@ struct seq_operations { | |||
30 | int (*show) (struct seq_file *m, void *v); | 30 | int (*show) (struct seq_file *m, void *v); |
31 | }; | 31 | }; |
32 | 32 | ||
33 | #define SEQ_SKIP 1 | ||
34 | |||
33 | int seq_open(struct file *, const struct seq_operations *); | 35 | int seq_open(struct file *, const struct seq_operations *); |
34 | ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); | 36 | ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); |
35 | loff_t seq_lseek(struct file *, loff_t, int); | 37 | loff_t seq_lseek(struct file *, loff_t, int); |