Lines Matching defs:name

48 static int disconnect(const struct path *path, char *buf, char **name,
60 if (**name == '/')
61 *name = *name + 1;
63 if (**name != '/')
65 error = prepend(name, *name - buf, "/", 1);
67 error = prepend(name, *name - buf, disconnected,
75 * d_namespace_path - lookup a name associated with a given path
78 * @name: Returns - pointer for start of path name with in @buf (NOT NULL)
82 * Handle path name lookup.
85 * When no error the path name is returned in @name which points to
88 static int d_namespace_path(const struct path *path, char *buf, char **name,
100 *name = res;
102 *name = buf;
106 strncmp(*name, "/sys/", 5) == 0) {
110 error = prepend(name, *name - buf, "/proc", 5);
113 error = disconnect(path, buf, name, flags,
136 *name = buf;
143 *name = buf;
149 *name = res;
152 error = disconnect(path, buf, name, flags, disconnected);
171 if (!error && isdir && ((*name)[1] != '\0' || (*name)[0] != '/'))
180 * @flags: flags controlling path name generation
181 * @buffer: buffer to put name in (NOT NULL)
182 * @name: Returns - the generated path name if !error (NOT NULL)
186 * @name is a pointer to the beginning of the pathname (which usually differs
187 * from the beginning of the buffer), or NULL. If there is an error @name
188 * may contain a partial or invalid name that can be used for audit purposes,
195 * Returns: %0 else error code if could retrieve name
198 const char **name, const char **info, const char *disconnected)
205 *info = "Failed name lookup - deleted entry";
207 *info = "Failed name lookup - disconnected path";
209 *info = "Failed name lookup - name too long";
211 *info = "Failed name lookup";
214 *name = str;