Lines Matching refs:path
54 char path[PATH_MAX]; member
77 strlcat(info->path, type, sizeof(info->path)); in print_type()
78 if ((link_dest_size = readlink(info->path, link_dest, sizeof(link_dest)-1)) < 0) { in print_type()
82 snprintf(link_dest, sizeof(link_dest), "%s (readlink: %s)", info->path, strerror(errno)); in print_type()
96 info->path[info->parent_length] = '\0'; in print_type()
108 strlcat(info->path, "maps", sizeof(info->path)); in print_maps()
110 maps = fopen(info->path, "r"); in print_maps()
128 info->path[info->parent_length] = '\0'; in print_maps()
135 strlcat(info->path, fd_path, sizeof(info->path)); in print_fds()
140 DIR *dir = opendir(info->path); in print_fds()
143 snprintf(msg, sizeof(msg), "%s (opendir: %s)", info->path, strerror(errno)); in print_fds()
161 info->path[info->parent_length] = '\0'; in print_fds()
172 snprintf(info.path, sizeof(info.path), "/proc/%d/", pid); in lsof_dumpinfo()
173 info.parent_length = strlen(info.path); in lsof_dumpinfo()
176 if (!stat(info.path, &pidstat)) { in lsof_dumpinfo()
188 strlcat(info.path, "cmdline", sizeof(info.path)); in lsof_dumpinfo()
189 fd = open(info.path, O_RDONLY); in lsof_dumpinfo()
191 fprintf(stderr, "Couldn't read %s\n", info.path); in lsof_dumpinfo()
200 fprintf(stderr, "Error reading cmdline: %s: %s\n", info.path, strerror(errno)); in lsof_dumpinfo()