On Tue 09 Oct at 02:30:11 +0100 viro@ftp.linux.org.uk said:Aaah...OK. Can we add something like the following then: Document that output must only come from _show() and SEQ_START_TOKEN is how a _start() indicates a header is to be printed. Signed-off-by: Tim Pepper <lnxninja@linux.vnet.ibm.com> Cc: Al Viro <viro@ftp.linux.org.uk> --- --- linux-2.6.orig/include/linux/seq_file.h +++ linux-2.6.23-rc9/include/linux/seq_file.h @@ -36,9 +36,10 @@ ssize_t seq_read(struct file *, char __u loff_t seq_lseek(struct file *, loff_t, int); int seq_release(struct inode *, struct file *); int seq_escape(struct seq_file *, const char *, const char *); + +/* these may only be called from a (*show) function */ int seq_putc(struct seq_file *m, char c); int seq_puts(struct seq_file *m, const char *s); - int seq_printf(struct seq_file *, const char *, ...) __attribute__ ((format (printf,2,3))); @@ -48,6 +49,11 @@ int single_open(struct file *, int (*)(s int single_release(struct inode *, struct file *); int seq_release_private(struct inode *, struct file *); +/* + * return SEQ_START_TOKEN in your (*start) function and test for + * (v == SEQ_START_TOKEN) in * your (*show) funtion in order to + * print a header before your seq data + */ #define SEQ_START_TOKEN ((void *)1) /* -
| hooanon05 | [PATCH 67/67] merge aufs |
| Greg Kroah-Hartman | [PATCH 008/196] Chinese: add translation of volatile-considered-harmful.txt |
| monstr | [PATCH 33/52] [microblaze] bug headers files |
| Oliver Pinter | Re: x86: 4kstacks default |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
