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()
108 blen = *buflen; in prepend_path()
154 *buflen = blen; in prepend_path()
176 char *buf, int buflen) in __d_path() argument
178 char *res = buf + buflen; in __d_path()
181 prepend(&res, &buflen, "\0", 1); in __d_path()
182 error = prepend_path(path, root, &res, &buflen); in __d_path()
192 char *buf, int buflen) in d_absolute_path() argument
195 char *res = buf + buflen; in d_absolute_path()
198 prepend(&res, &buflen, "\0", 1); in d_absolute_path()
199 error = prepend_path(path, &root, &res, &buflen); in d_absolute_path()
213 char **buf, int *buflen) in path_with_deleted() argument
215 prepend(buf, buflen, "\0", 1); in path_with_deleted()
217 int error = prepend(buf, buflen, " (deleted)", 10); in path_with_deleted()
222 return prepend_path(path, root, buf, buflen); in path_with_deleted()
225 static int prepend_unreachable(char **buffer, int *buflen) in prepend_unreachable() argument
227 return prepend(buffer, buflen, "(unreachable)", 13); in prepend_unreachable()
256 char *d_path(const struct path *path, char *buf, int buflen) in d_path() argument
258 char *res = buf + buflen; in d_path()
275 return path->dentry->d_op->d_dname(path->dentry, buf, buflen); in d_path()
279 error = path_with_deleted(path, &root, &res, &buflen); in d_path()
291 char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen, in dynamic_dname() argument
302 if (sz > sizeof(temp) || sz > buflen) in dynamic_dname()
305 buffer += buflen - sz; in dynamic_dname()
309 char *simple_dname(struct dentry *dentry, char *buffer, int buflen) in simple_dname() argument
311 char *end = buffer + buflen; in simple_dname()
313 if (prepend(&end, &buflen, " (deleted)", 11) || in simple_dname()
314 prepend(&end, &buflen, dentry->d_name.name, dentry->d_name.len) || in simple_dname()
315 prepend(&end, &buflen, "/", 1)) in simple_dname()
324 static char *__dentry_path(struct dentry *d, char *buf, int buflen) in __dentry_path() argument
331 if (buflen < 2) in __dentry_path()
337 end = buf + buflen; in __dentry_path()
338 len = buflen; in __dentry_path()
369 char *dentry_path_raw(struct dentry *dentry, char *buf, int buflen) in dentry_path_raw() argument
371 return __dentry_path(dentry, buf, buflen); in dentry_path_raw()
375 char *dentry_path(struct dentry *dentry, char *buf, int buflen) in dentry_path() argument
381 p = buf + buflen; in dentry_path()
382 if (prepend(&p, &buflen, "//deleted", 10) != 0) in dentry_path()
384 buflen++; in dentry_path()
386 retval = __dentry_path(dentry, buf, buflen); in dentry_path()
440 int buflen = PATH_MAX; in SYSCALL_DEFINE2() local
442 prepend(&cwd, &buflen, "\0", 1); in SYSCALL_DEFINE2()
443 error = prepend_path(&pwd, &root, &cwd, &buflen); in SYSCALL_DEFINE2()
451 error = prepend_unreachable(&cwd, &buflen); in SYSCALL_DEFINE2()