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