diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2008-03-27 08:06:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-23 00:04:38 -0400 |
commit | 9d1bc60138977d9c79471b344a64f2df13b2ccef (patch) | |
tree | 84ed2e1920a1a88ae84515bd9d90240faed5805c /include/linux | |
parent | 6092d048183b76bfa3f84b32f8158dd8d10bd811 (diff) |
[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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dcache.h | 1 | ||||
-rw-r--r-- | include/linux/seq_file.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 63960033b6f5..cfb1627ac51c 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -301,6 +301,7 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
301 | */ | 301 | */ |
302 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 302 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
303 | 303 | ||
304 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | ||
304 | extern char *d_path(struct path *, char *, int); | 305 | extern char *d_path(struct path *, char *, int); |
305 | extern char *dentry_path(struct dentry *, char *, int); | 306 | extern char *dentry_path(struct dentry *, char *, int); |
306 | 307 | ||
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 11676ccef7b3..5b5369c3c209 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -46,6 +46,8 @@ int seq_printf(struct seq_file *, const char *, ...) | |||
46 | 46 | ||
47 | int seq_path(struct seq_file *, struct path *, char *); | 47 | int seq_path(struct seq_file *, struct path *, char *); |
48 | int seq_dentry(struct seq_file *, struct dentry *, char *); | 48 | int seq_dentry(struct seq_file *, struct dentry *, char *); |
49 | int seq_path_root(struct seq_file *m, struct path *path, struct path *root, | ||
50 | char *esc); | ||
49 | 51 | ||
50 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); | 52 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); |
51 | int single_release(struct inode *, struct file *); | 53 | int single_release(struct inode *, struct file *); |