Lines Matching refs:filename
146 static int vfs_normalize_path_parame_check(const char *filename, char **pathname)
157 if (filename == NULL) {
162 namelen = vfs_strnlen(filename, PATH_MAX);
171 for (name = (char *)filename + namelen; ((name != filename) && (*name != '/')); name--) {
181 static char *vfs_not_absolute_path(const char *directory, const char *filename, char **pathname, int namelen)
188 if ((namelen > 1) && (filename[0] == '.') && (filename[1] == '/')) {
189 filename += 2;
202 "%s/%s", directory, filename);
213 static char *vfs_normalize_fullpath(const char *directory, const char *filename, char **pathname, int namelen)
217 if (filename[0] != '/') {
220 fullpath = vfs_not_absolute_path(directory, filename, pathname, namelen);
227 fullpath = strdup(filename); /* copy string */
233 if (filename[1] == '/') {
244 int vfs_normalize_path(const char *directory, const char *filename, char **pathname)
254 namelen = vfs_normalize_path_parame_check(filename, pathname);
265 if ((directory == NULL) && (filename[0] != '/')) {
274 if ((filename[0] != '/') && (strlen(directory) + namelen + 2 > TEMP_PATH_MAX)) {
283 fullpath = vfs_normalize_fullpath(directory, filename, pathname, namelen);
305 int vfs_normalize_pathat(int dirfd, const char *filename, char **pathname)
317 ret = vfs_normalize_path((const char *)relativeoldpath, filename, &fullpath);