Lines Matching refs:path

25 		zfree(&files[nr].path);  in close_dir()
54 if (asprintf(&file->path, "%s/data.%d", data->path, i) < 0) in perf_data__create_dir()
57 ret = open(file->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); in perf_data__create_dir()
86 dir = opendir(data->path); in perf_data__open_dir()
92 char path[PATH_MAX]; in perf_data__open_dir() local
95 snprintf(path, sizeof(path), "%s/%s", data->path, dent->d_name); in perf_data__open_dir()
96 if (stat(path, &st)) in perf_data__open_dir()
111 file->path = strdup(path); in perf_data__open_dir()
112 if (!file->path) in perf_data__open_dir()
115 ret = open(file->path, O_RDONLY); in perf_data__open_dir()
162 if (!data->path) { in check_pipe()
166 if (!strcmp(data->path, "-")) in check_pipe()
183 if (!stat(data->path, &st) && st.st_size) { in check_backup()
188 data->path); in check_backup()
199 if (rename(data->path, oldname)) { in check_backup()
202 data->path, oldname); in check_backup()
214 if (stat(data->path, &st)) in is_dir()
226 fd = open(data->file.path, O_RDONLY); in open_file_read()
230 pr_err("failed to open %s: %s", data->file.path, in open_file_read()
232 if (err == ENOENT && !strcmp(data->file.path, "perf.data")) in open_file_read()
243 data->file.path); in open_file_read()
249 data->file.path); in open_file_read()
266 fd = open(data->file.path, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC, in open_file_write()
270 pr_err("failed to open %s : %s\n", data->file.path, in open_file_write()
284 zfree(&data->file.path); in open_file()
294 data->file.path = strdup(data->path); in open_file_dup()
295 if (!data->file.path) in open_file_dup()
309 if (asprintf(&data->file.path, "%s/header", data->path) < 0) in open_dir()
313 mkdir(data->path, S_IRWXU) < 0) in open_dir()
320 rm_rf_perf_data(data->path); in open_dir()
330 if (!data->path) in perf_data__open()
331 data->path = "perf.data"; in perf_data__open()
348 zfree(&data->file.path); in perf_data__close()
376 if (asprintf(new_filepath, "%s.%s", data->path, postfix) < 0) in perf_data__switch()
383 if (rename(data->path, *new_filepath)) in perf_data__switch()
384 pr_warning("Failed to rename %s to %s\n", data->path, *new_filepath); in perf_data__switch()