Lines Matching refs:buflen
2822 static int prepend(char **buffer, int *buflen, const char *str, int namelen) in prepend() argument
2824 *buflen -= namelen; in prepend()
2825 if (*buflen < 0) in prepend()
2850 static int prepend_name(char **buffer, int *buflen, struct qstr *name) in prepend_name() argument
2858 *buflen -= dlen + 1; in prepend_name()
2859 if (*buflen < 0) in prepend_name()
2891 char **buffer, int *buflen) in prepend_path() argument
2908 blen = *buflen; in prepend_path()
2922 blen = *buflen; in prepend_path()
2968 *buflen = blen; in prepend_path()
2990 char *buf, int buflen) in __d_path() argument
2992 char *res = buf + buflen; in __d_path()
2995 prepend(&res, &buflen, "\0", 1); in __d_path()
2996 error = prepend_path(path, root, &res, &buflen); in __d_path()
3006 char *buf, int buflen) in d_absolute_path() argument
3009 char *res = buf + buflen; in d_absolute_path()
3012 prepend(&res, &buflen, "\0", 1); in d_absolute_path()
3013 error = prepend_path(path, &root, &res, &buflen); in d_absolute_path()
3027 char **buf, int *buflen) in path_with_deleted() argument
3029 prepend(buf, buflen, "\0", 1); in path_with_deleted()
3031 int error = prepend(buf, buflen, " (deleted)", 10); in path_with_deleted()
3036 return prepend_path(path, root, buf, buflen); in path_with_deleted()
3039 static int prepend_unreachable(char **buffer, int *buflen) in prepend_unreachable() argument
3041 return prepend(buffer, buflen, "(unreachable)", 13); in prepend_unreachable()
3070 char *d_path(const struct path *path, char *buf, int buflen) in d_path() argument
3072 char *res = buf + buflen; in d_path()
3089 return path->dentry->d_op->d_dname(path->dentry, buf, buflen); in d_path()
3093 error = path_with_deleted(path, &root, &res, &buflen); in d_path()
3105 char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen, in dynamic_dname() argument
3116 if (sz > sizeof(temp) || sz > buflen) in dynamic_dname()
3119 buffer += buflen - sz; in dynamic_dname()
3123 char *simple_dname(struct dentry *dentry, char *buffer, int buflen) in simple_dname() argument
3125 char *end = buffer + buflen; in simple_dname()
3127 if (prepend(&end, &buflen, " (deleted)", 11) || in simple_dname()
3128 prepend(&end, &buflen, dentry->d_name.name, dentry->d_name.len) || in simple_dname()
3129 prepend(&end, &buflen, "/", 1)) in simple_dname()
3138 static char *__dentry_path(struct dentry *d, char *buf, int buflen) in __dentry_path() argument
3145 if (buflen < 2) in __dentry_path()
3151 end = buf + buflen; in __dentry_path()
3152 len = buflen; in __dentry_path()
3183 char *dentry_path_raw(struct dentry *dentry, char *buf, int buflen) in dentry_path_raw() argument
3185 return __dentry_path(dentry, buf, buflen); in dentry_path_raw()
3189 char *dentry_path(struct dentry *dentry, char *buf, int buflen) in dentry_path() argument
3195 p = buf + buflen; in dentry_path()
3196 if (prepend(&p, &buflen, "//deleted", 10) != 0) in dentry_path()
3198 buflen++; in dentry_path()
3200 retval = __dentry_path(dentry, buf, buflen); in dentry_path()
3254 int buflen = PATH_MAX; in SYSCALL_DEFINE2() local
3256 prepend(&cwd, &buflen, "\0", 1); in SYSCALL_DEFINE2()
3257 error = prepend_path(&pwd, &root, &cwd, &buflen); in SYSCALL_DEFINE2()
3265 error = prepend_unreachable(&cwd, &buflen); in SYSCALL_DEFINE2()