]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/seq_file.h
Char: char/serial, remove SERIAL_TYPE_NORMAL redefines
[linux-2.6-omap-h63xx.git] / include / linux / seq_file.h
index 3e3cccbb1cac355f385f474477f2222015e1e528..648dfeb444db33dee57c705b591fe68bbd3eaa9c 100644 (file)
@@ -18,7 +18,7 @@ struct seq_file {
        size_t from;
        size_t count;
        loff_t index;
-       loff_t version;
+       u64 version;
        struct mutex lock;
        const struct seq_operations *op;
        void *private;
@@ -46,9 +46,35 @@ int seq_path(struct seq_file *, struct vfsmount *, struct dentry *, char *);
 
 int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
 int single_release(struct inode *, struct file *);
+void *__seq_open_private(struct file *, const struct seq_operations *, int);
+int seq_open_private(struct file *, const struct seq_operations *, int);
 int seq_release_private(struct inode *, struct file *);
 
 #define SEQ_START_TOKEN ((void *)1)
 
+/*
+ * Helpers for iteration over list_head-s in seq_files
+ */
+
+extern struct list_head *seq_list_start(struct list_head *head,
+               loff_t pos);
+extern struct list_head *seq_list_start_head(struct list_head *head,
+               loff_t pos);
+extern struct list_head *seq_list_next(void *v, struct list_head *head,
+               loff_t *ppos);
+
+struct net;
+struct seq_net_private {
+       struct net *net;
+};
+
+int seq_open_net(struct inode *, struct file *,
+                const struct seq_operations *, int);
+int seq_release_net(struct inode *, struct file *);
+static inline struct net *seq_file_net(struct seq_file *seq)
+{
+       return ((struct seq_net_private *)seq->private)->net;
+}
+
 #endif
 #endif