Lines Matching defs:P
42 Pfd2info(struct ps_prochandle *P, int fd)
44 fd_info_t *fip = list_next(&P->fd_head);
49 list_link(&P->fd_head, NULL);
50 fip = list_next(&P->fd_head);
53 for (i = 0; i < P->num_fd; i++, fip = list_next(fip)) {
67 list_link(fip, next ? next : (void *)&(P->fd_head));
68 P->num_fd++;
76 load_fdinfo(struct ps_prochandle *P)
84 if (P->num_fd > 0) {
88 if (P->state != PS_DEAD && P->state != PS_IDLE) {
99 "%s/%d/path", procfs_path, (int)P->pid);
116 fip = Pfd2info(P, fd);
120 if (pr_fstat64(P, fd, &stat) == 0) {
132 info->pr_fileflags = pr_fcntl(P, fd, F_GETXFL, 0);
133 info->pr_fdflags = pr_fcntl(P, fd, F_GETFD, 0);
134 info->pr_offset = pr_llseek(P, fd, 0, SEEK_CUR);
145 "%s/%d/path/%d", procfs_path, (int)P->pid,
164 Pfdinfo_iter(struct ps_prochandle *P, proc_fdinfo_f *func, void *cd)
170 load_fdinfo(P);
174 for (fip = list_prev(&P->fd_head);
175 fip != (void *)&P->fd_head && fip != NULL;