Lines Matching refs:buflen

2824 static int prepend(char **buffer, int *buflen, const char *str, int namelen)  in prepend()  argument
2826 *buflen -= namelen; in prepend()
2827 if (*buflen < 0) in prepend()
2852 static int prepend_name(char **buffer, int *buflen, struct qstr *name) in prepend_name() argument
2860 *buflen -= dlen + 1; in prepend_name()
2861 if (*buflen < 0) in prepend_name()
2893 char **buffer, int *buflen) in prepend_path() argument
2910 blen = *buflen; in prepend_path()
2924 blen = *buflen; in prepend_path()
2970 *buflen = blen; in prepend_path()
2992 char *buf, int buflen) in __d_path() argument
2994 char *res = buf + buflen; in __d_path()
2997 prepend(&res, &buflen, "\0", 1); in __d_path()
2998 error = prepend_path(path, root, &res, &buflen); in __d_path()
3008 char *buf, int buflen) in d_absolute_path() argument
3011 char *res = buf + buflen; in d_absolute_path()
3014 prepend(&res, &buflen, "\0", 1); in d_absolute_path()
3015 error = prepend_path(path, &root, &res, &buflen); in d_absolute_path()
3029 char **buf, int *buflen) in path_with_deleted() argument
3031 prepend(buf, buflen, "\0", 1); in path_with_deleted()
3033 int error = prepend(buf, buflen, " (deleted)", 10); in path_with_deleted()
3038 return prepend_path(path, root, buf, buflen); in path_with_deleted()
3041 static int prepend_unreachable(char **buffer, int *buflen) in prepend_unreachable() argument
3043 return prepend(buffer, buflen, "(unreachable)", 13); in prepend_unreachable()
3072 char *d_path(const struct path *path, char *buf, int buflen) in d_path() argument
3074 char *res = buf + buflen; in d_path()
3091 return path->dentry->d_op->d_dname(path->dentry, buf, buflen); in d_path()
3095 error = path_with_deleted(path, &root, &res, &buflen); in d_path()
3107 char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen, in dynamic_dname() argument
3118 if (sz > sizeof(temp) || sz > buflen) in dynamic_dname()
3121 buffer += buflen - sz; in dynamic_dname()
3125 char *simple_dname(struct dentry *dentry, char *buffer, int buflen) in simple_dname() argument
3127 char *end = buffer + buflen; in simple_dname()
3129 if (prepend(&end, &buflen, " (deleted)", 11) || in simple_dname()
3130 prepend(&end, &buflen, dentry->d_name.name, dentry->d_name.len) || in simple_dname()
3131 prepend(&end, &buflen, "/", 1)) in simple_dname()
3140 static char *__dentry_path(struct dentry *d, char *buf, int buflen) in __dentry_path() argument
3147 if (buflen < 2) in __dentry_path()
3153 end = buf + buflen; in __dentry_path()
3154 len = buflen; in __dentry_path()
3185 char *dentry_path_raw(struct dentry *dentry, char *buf, int buflen) in dentry_path_raw() argument
3187 return __dentry_path(dentry, buf, buflen); in dentry_path_raw()
3191 char *dentry_path(struct dentry *dentry, char *buf, int buflen) in dentry_path() argument
3197 p = buf + buflen; in dentry_path()
3198 if (prepend(&p, &buflen, "//deleted", 10) != 0) in dentry_path()
3200 buflen++; in dentry_path()
3202 retval = __dentry_path(dentry, buf, buflen); in dentry_path()
3256 int buflen = PATH_MAX; in SYSCALL_DEFINE2() local
3258 prepend(&cwd, &buflen, "\0", 1); in SYSCALL_DEFINE2()
3259 error = prepend_path(&pwd, &root, &cwd, &buflen); in SYSCALL_DEFINE2()
3267 error = prepend_unreachable(&cwd, &buflen); in SYSCALL_DEFINE2()