Lines Matching defs:path
102 static bool is_bpffs(char *path)
106 if (statfs(path, &st_fs) < 0)
165 int open_obj_pinned(const char *path, bool quiet)
170 pname = strdup(path);
193 int open_obj_pinned_any(const char *path, enum bpf_obj_type exp_type)
198 fd = open_obj_pinned(path, false);
303 char path[PATH_MAX];
307 snprintf(path, sizeof(path), "/proc/self/fd/%d", fd);
309 n = readlink(path, buf, sizeof(buf));
314 if (n == sizeof(path)) {
315 p_err("can't read link type: path too long!");
331 char path[PATH_MAX];
337 snprintf(path, sizeof(path), "/proc/self/fdinfo/%d", fd);
339 fdi = fopen(path, "r");
426 obj_node->path = strdup(fpath);
427 if (!obj_node->path) {
457 char *path = mntent->mnt_dir;
461 err = nftw(path, do_build_table_cb, nopenfd, flags);
477 free(obj->path);
520 static int read_sysfs_hex_int(char *path)
526 fd = open(path, O_RDONLY);
528 p_err("Can't open %s: %s", path, strerror(errno));
535 p_err("Can't read %s: %s", path, strerror(errno));
539 p_err("Value in %s too long", path);
762 char *path;
766 path = **argv;
769 (*fds)[0] = open_obj_pinned_any(path, BPF_OBJ_PROG);
899 char *path;
903 path = **argv;
906 (*fds)[0] = open_obj_pinned_any(path, BPF_OBJ_MAP);