Lines Matching defs:path
1106 static struct btf *btf_parse_elf(const char *path, struct btf *base_btf,
1125 pr_warn("failed to init libelf for %s\n", path);
1130 fd = open(path, O_RDONLY | O_CLOEXEC);
1133 pr_warn("failed to open %s: %s\n", path, strerror(errno));
1143 if (!elfio_load(elf, path)) {
1149 pr_warn("failed to open %s as ELF file\n", path);
1159 pr_warn("failed to get EHDR from %s\n", path);
1170 path);
1176 pr_warn("failed to get e_shstrndx from %s\n", path);
1207 idx, path);
1217 idx, path);
1231 idx, name, path);
1246 idx, name, path);
1256 pr_warn("failed to find '%s' ELF section in %s\n", BTF_ELF_SEC, path);
1277 pr_warn("failed to get ELF class (bitness) for %s\n", path);
1310 struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext)
1312 return libbpf_ptr(btf_parse_elf(path, NULL, btf_ext));
1315 struct btf *btf__parse_elf_split(const char *path, struct btf *base_btf)
1317 return libbpf_ptr(btf_parse_elf(path, base_btf, NULL));
1320 static struct btf *btf_parse_raw(const char *path, struct btf *base_btf)
1329 f = fopen(path, "rbe");
1383 struct btf *btf__parse_raw(const char *path)
1385 return libbpf_ptr(btf_parse_raw(path, NULL));
1388 struct btf *btf__parse_raw_split(const char *path, struct btf *base_btf)
1390 return libbpf_ptr(btf_parse_raw(path, base_btf));
1393 static struct btf *btf_parse(const char *path, struct btf *base_btf, struct btf_ext **btf_ext)
1401 btf = btf_parse_raw(path, base_btf);
1407 return btf_parse_elf(path, base_btf, btf_ext);
1410 struct btf *btf__parse(const char *path, struct btf_ext **btf_ext)
1412 return libbpf_ptr(btf_parse(path, NULL, btf_ext));
1415 struct btf *btf__parse_split(const char *path, struct btf *base_btf)
1417 return libbpf_ptr(btf_parse(path, base_btf, NULL));
5043 char path[PATH_MAX + 1];
5051 snprintf(path, PATH_MAX, locations[i], buf.release);
5053 if (faccessat(AT_FDCWD, path, R_OK, AT_EACCESS))
5056 btf = btf__parse(path, NULL);
5058 pr_debug("loading kernel BTF '%s': %d\n", path, err);
5073 char path[80];
5075 snprintf(path, sizeof(path), "/sys/kernel/btf/%s", module_name);
5076 return btf__parse_split(path, vmlinux_btf);