Lines Matching refs:buflen

11 static int prepend(char **buffer, int *buflen, const char *str, int namelen)  in prepend()  argument
13 *buflen -= namelen; in prepend()
14 if (*buflen < 0) in prepend()
38 static int prepend_name(char **buffer, int *buflen, const struct qstr *name) in prepend_name() argument
44 *buflen -= dlen + 1; in prepend_name()
45 if (*buflen < 0) in prepend_name()
77 char **buffer, int *buflen) in prepend_path() argument
94 blen = *buflen; in prepend_path()
110 blen = *buflen; in prepend_path()
160 *buflen = blen; in prepend_path()
182 char *buf, int buflen) in __d_path() argument
184 char *res = buf + buflen; in __d_path()
187 prepend(&res, &buflen, "\0", 1); in __d_path()
188 error = prepend_path(path, root, &res, &buflen); in __d_path()
198 char *buf, int buflen) in d_absolute_path() argument
201 char *res = buf + buflen; in d_absolute_path()
204 prepend(&res, &buflen, "\0", 1); in d_absolute_path()
205 error = prepend_path(path, &root, &res, &buflen); in d_absolute_path()
219 char **buf, int *buflen) in path_with_deleted() argument
221 prepend(buf, buflen, "\0", 1); in path_with_deleted()
223 int error = prepend(buf, buflen, " (deleted)", 10); in path_with_deleted()
228 return prepend_path(path, root, buf, buflen); in path_with_deleted()
231 static int prepend_unreachable(char **buffer, int *buflen) in prepend_unreachable() argument
233 return prepend(buffer, buflen, "(unreachable)", 13); in prepend_unreachable()
262 char *d_path(const struct path *path, char *buf, int buflen) in d_path() argument
264 char *res = buf + buflen; in d_path()
281 return path->dentry->d_op->d_dname(path->dentry, buf, buflen); in d_path()
285 error = path_with_deleted(path, &root, &res, &buflen); in d_path()
297 char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen, in dynamic_dname() argument
308 if (sz > sizeof(temp) || sz > buflen) in dynamic_dname()
311 buffer += buflen - sz; in dynamic_dname()
315 char *simple_dname(struct dentry *dentry, char *buffer, int buflen) in simple_dname() argument
317 char *end = buffer + buflen; in simple_dname()
319 if (prepend(&end, &buflen, " (deleted)", 11) || in simple_dname()
320 prepend(&end, &buflen, dentry->d_name.name, dentry->d_name.len) || in simple_dname()
321 prepend(&end, &buflen, "/", 1)) in simple_dname()
329 static char *__dentry_path(struct dentry *d, char *buf, int buflen) in __dentry_path() argument
336 if (buflen < 2) in __dentry_path()
342 end = buf + buflen; in __dentry_path()
343 len = buflen; in __dentry_path()
374 char *dentry_path_raw(struct dentry *dentry, char *buf, int buflen) in dentry_path_raw() argument
376 return __dentry_path(dentry, buf, buflen); in dentry_path_raw()
380 char *dentry_path(struct dentry *dentry, char *buf, int buflen) in dentry_path() argument
386 p = buf + buflen; in dentry_path()
387 if (prepend(&p, &buflen, "//deleted", 10) != 0) in dentry_path()
389 buflen++; in dentry_path()
391 retval = __dentry_path(dentry, buf, buflen); in dentry_path()
445 int buflen = PATH_MAX; in SYSCALL_DEFINE2() local
447 prepend(&cwd, &buflen, "\0", 1); in SYSCALL_DEFINE2()
448 error = prepend_path(&pwd, &root, &cwd, &buflen); in SYSCALL_DEFINE2()
456 error = prepend_unreachable(&cwd, &buflen); in SYSCALL_DEFINE2()