Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24 /fs/seq_file.c

Filename:/fs/seq_file.c
Lines Added:33
Lines Deleted:0
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4  2.6.24-rc3 
(Following) 2.6.25-rc1-git4  2.6.25-rc2  2.6.25-rc3  2.6.25-rc4  2.6.25-rc5  2.6.25-rc6 

Location
[  2.6.24
  [  fs
     o  seq_file.c

Patch

diff --git a/fs/seq_file.c b/fs/seq_file.c
index bbb19be..ca71c11 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -429,6 +429,39 @@ int seq_release_private(struct inode *inode, struct file *file)
 }
 EXPORT_SYMBOL(seq_release_private);
 
+void *__seq_open_private(struct file *f, const struct seq_operations *ops,
+      int psize)
+{
+   int rc;
+   void *private;
+   struct seq_file *seq;
+
+   private = kzalloc(psize, GFP_KERNEL);
+   if (private == NULL)
+      goto out;
+
+   rc = seq_open(f, ops);
+   if (rc < 0)
+      goto out_free;
+
+   seq = f->private_data;
+   seq->private = private;
+   return private;
+
+out_free:
+   kfree(private);
+out:
+   return NULL;
+}
+EXPORT_SYMBOL(__seq_open_private);
+
+int seq_open_private(struct file *filp, const struct seq_operations *ops,
+      int psize)
+{
+   return __seq_open_private(filp, ops, psize) ? 0 : -ENOMEM;
+}
+EXPORT_SYMBOL(seq_open_private);
+
 int seq_putc(struct seq_file *m, char c)
 {
    if (m->count < m->size) {


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.