drm/plane: Remove redundant extern
[firefly-linux-kernel-4.4.55.git] / fs / seq_file.c
index 5f163c6c821cb3c5d4b0153ae1dbad7a129deb80..ce9e39fd5dafc768c27b2ceaa4e69a02c3ed1e6e 100644 (file)
@@ -48,6 +48,8 @@ static void *seq_buf_alloc(unsigned long size)
  *     ERR_PTR(error).  In the end of sequence they return %NULL. ->show()
  *     returns 0 in case of success and negative number in case of error.
  *     Returning SEQ_SKIP means "discard this element and move on".
+ *     Note: seq_open() will allocate a struct seq_file and store its
+ *     pointer in @file->private_data. This pointer should not be modified.
  */
 int seq_open(struct file *file, const struct seq_operations *op)
 {
@@ -488,6 +490,20 @@ int seq_path(struct seq_file *m, const struct path *path, const char *esc)
 }
 EXPORT_SYMBOL(seq_path);
 
+/**
+ * seq_file_path - seq_file interface to print a pathname of a file
+ * @m: the seq_file handle
+ * @file: the struct file to print
+ * @esc: set of characters to escape in the output
+ *
+ * return the absolute path to the file.
+ */
+int seq_file_path(struct seq_file *m, struct file *file, const char *esc)
+{
+       return seq_path(m, &file->f_path, esc);
+}
+EXPORT_SYMBOL(seq_file_path);
+
 /*
  * Same as seq_path, but relative to supplied root.
  */
@@ -539,6 +555,7 @@ int seq_dentry(struct seq_file *m, struct dentry *dentry, const char *esc)
 
        return res;
 }
+EXPORT_SYMBOL(seq_dentry);
 
 static void *single_start(struct seq_file *p, loff_t *pos)
 {