[patch 2/7] vfs: mountinfo: add seq_file_root()

Add a new function:

  seq_file_root()

This is similar to seq_path(), but calculates the path relative to the
given root, instead of current->fs->root.  If the path was unreachable
from root, then modify the root parameter to reflect this.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Miklos Szeredi
2008-03-27 13:06:21 +01:00
committed by Al Viro
parent 6092d04818
commit 9d1bc60138
4 changed files with 49 additions and 8 deletions

View File

@ -46,6 +46,8 @@ int seq_printf(struct seq_file *, const char *, ...)
int seq_path(struct seq_file *, struct path *, char *);
int seq_dentry(struct seq_file *, struct dentry *, char *);
int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
char *esc);
int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
int single_release(struct inode *, struct file *);