update seq_file to support single_open()
PATCH 1/1 update seq_file to support single_open()
Hi Marcelo,
This patch updates the seq_file interface in 2.4.21-pre to be the same as what's included in 2.5.67-bk7. That is, it addes single_open() and single_release() methods for simpler seq file output.
It also corrects a few typos (straight from 2.5.67-bk7).
Please apply.
Thanks,
--
~Randy
include/linux/seq_file.h +8 -0
@@ -2,7 +2,13 @@#define _LINUX_SEQ_FILE_H #ifdef __KERNEL__ +#include <linux/types.h> +#include <linux/string.h> +#include <asm/semaphore.h> + struct seq_operations; +struct file; +struct inode; struct seq_file { char *buf;
@@ -52,5 +58,7 @@ static inline int seq_puts(struct seq_fiint seq_printf (struct seq_file *,const char *, ...) __attribute__ ((format (printf,2 ,3 ))); +int single_open (struct file *,int (*)(struct seq_file *,void *),void *); +int single_release (struct inode *,struct file *);#endif #endif
fs/seq_file.c +47 -4
84 lines not on this page · raw message
kernel/ksyms.c renamed from kernel/ksyms.c%SEQ +2 -0
@@ -506,6 +506,8 @@ EXPORT_SYMBOL(seq_open);EXPORT_SYMBOL (seq_release);EXPORT_SYMBOL (seq_read);EXPORT_SYMBOL (seq_lseek); +EXPORT_SYMBOL (single_open); +EXPORT_SYMBOL (single_release);/* Program loader interfaces */ EXPORT_SYMBOL (setup_arg_pages);
Saved to 2.4.22-pre folder.