Lines Matching full:path
19 #include <linux/path.h>
25 #include "include/path.h"
41 /* If the path is not connected to the expected root,
45 * specifically directed to connect the path,
47 * if in a chroot and doing chroot relative paths and the path
52 static int disconnect(const struct path *path, char *buf, char **name, in disconnect() argument
59 our_mnt(path->mnt))) { in disconnect()
60 /* disconnected path, don't return pathname starting in disconnect()
79 * d_namespace_path - lookup a name associated with a given path
80 * @path: path to lookup (NOT NULL)
81 * @buf: buffer to store path to (NOT NULL)
82 * @name: Returns - pointer for start of path name with in @buf (NOT NULL)
83 * @flags: flags controlling path lookup
86 * Handle path name lookup.
88 * Returns: %0 else error code if path lookup fails
89 * When no error the path name is returned in @name which points to
92 static int d_namespace_path(const struct path *path, char *buf, char **name, in d_namespace_path() argument
101 if (path->mnt->mnt_flags & MNT_INTERNAL) { in d_namespace_path()
103 res = dentry_path(path->dentry, buf, buflen); in d_namespace_path()
109 if (path->dentry->d_sb->s_magic == PROC_SUPER_MAGIC && in d_namespace_path()
117 error = disconnect(path, buf, name, flags, in d_namespace_path()
124 struct path root; in d_namespace_path()
126 res = __d_path(path, &root, buf, buflen); in d_namespace_path()
129 res = d_absolute_path(path, buf, buflen); in d_namespace_path()
130 if (!our_mnt(path->mnt)) in d_namespace_path()
134 /* handle error conditions - and still allow a partial path to in d_namespace_path()
144 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path()
150 } else if (!our_mnt(path->mnt)) in d_namespace_path()
156 error = disconnect(path, buf, name, flags, disconnected); in d_namespace_path()
164 if (d_unlinked(path->dentry) && d_is_positive(path->dentry) && in d_namespace_path()
183 * @path: path the file (NOT NULL)
184 * @flags: flags controlling path name generation
186 * @name: Returns - the generated path name if !error (NOT NULL)
187 * @info: Returns - information on why the path lookup failed (MAYBE NULL)
201 int aa_path_name(const struct path *path, int flags, char *buffer, in aa_path_name() argument
205 int error = d_namespace_path(path, buffer, &str, flags, disconnected); in aa_path_name()
211 *info = "Failed name lookup - disconnected path"; in aa_path_name()