|
@@ -447,3 +447,37 @@ int seq_puts(struct seq_file *m, const char *s)
|
|
|
return -1;
|
|
|
}
|
|
|
EXPORT_SYMBOL(seq_puts);
|
|
|
+
|
|
|
+struct list_head *seq_list_start(struct list_head *head, loff_t pos)
|
|
|
+{
|
|
|
+ struct list_head *lh;
|
|
|
+
|
|
|
+ list_for_each(lh, head)
|
|
|
+ if (pos-- == 0)
|
|
|
+ return lh;
|
|
|
+
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
+EXPORT_SYMBOL(seq_list_start);
|
|
|
+
|
|
|
+struct list_head *seq_list_start_head(struct list_head *head, loff_t pos)
|
|
|
+{
|
|
|
+ if (!pos)
|
|
|
+ return head;
|
|
|
+
|
|
|
+ return seq_list_start(head, pos - 1);
|
|
|
+}
|
|
|
+
|
|
|
+EXPORT_SYMBOL(seq_list_start_head);
|
|
|
+
|
|
|
+struct list_head *seq_list_next(void *v, struct list_head *head, loff_t *ppos)
|
|
|
+{
|
|
|
+ struct list_head *lh;
|
|
|
+
|
|
|
+ lh = ((struct list_head *)v)->next;
|
|
|
+ ++*ppos;
|
|
|
+ return lh == head ? NULL : lh;
|
|
|
+}
|
|
|
+
|
|
|
+EXPORT_SYMBOL(seq_list_next);
|