diff options
author | Ram Pai <linuxram@us.ibm.com> | 2008-03-27 08:06:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-23 00:04:32 -0400 |
commit | 6092d048183b76bfa3f84b32f8158dd8d10bd811 (patch) | |
tree | 2d38af32961eb52b36daca2f29ce69e80f6e7283 /include/linux | |
parent | 934b25c597c0e98304a7eaec198a87e4633a42bb (diff) |
[patch 1/7] vfs: mountinfo: add dentry_path()
[mszeredi@suse.cz] split big patch into managable chunks
Add the following functions:
dentry_path()
seq_dentry()
These are similar to d_path() and seq_path(). But instead of
calculating the path within a mount namespace, they calculate the path
from the root of the filesystem to a given dentry, ignoring mounts
completely.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
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 fabd16d03a27..63960033b6f5 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -302,6 +302,7 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
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(struct path *, char *, int); | 304 | extern char *d_path(struct path *, char *, int); |
305 | extern char *dentry_path(struct dentry *, char *, int); | ||
305 | 306 | ||
306 | /* Allocation counts.. */ | 307 | /* Allocation counts.. */ |
307 | 308 | ||
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index d65796dc26d9..11676ccef7b3 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -10,6 +10,7 @@ struct seq_operations; | |||
10 | struct file; | 10 | struct file; |
11 | struct path; | 11 | struct path; |
12 | struct inode; | 12 | struct inode; |
13 | struct dentry; | ||
13 | 14 | ||
14 | struct seq_file { | 15 | struct seq_file { |
15 | char *buf; | 16 | char *buf; |
@@ -44,6 +45,7 @@ int seq_printf(struct seq_file *, const char *, ...) | |||
44 | __attribute__ ((format (printf,2,3))); | 45 | __attribute__ ((format (printf,2,3))); |
45 | 46 | ||
46 | 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 *); | ||
47 | 49 | ||
48 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); | 50 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); |
49 | int single_release(struct inode *, struct file *); | 51 | int single_release(struct inode *, struct file *); |