Lines Matching refs:toybuf
94 snprintf(toybuf, sizeof(toybuf), "/proc/%d/fdinfo/%s", fi->pi.pid, fi->fd); in fill_flags()
95 fp = fopen(toybuf, "r"); in fill_flags()
312 snprintf(toybuf, sizeof(toybuf), "/proc/%d/%s", pi->pid, path); in visit_symlink()
316 snprintf(toybuf, sizeof(toybuf), "/proc/%d/fd/%s", pi->pid, path); in visit_symlink()
320 fill_stat(fi, toybuf); in visit_symlink()
322 fi->name = xreadlink(toybuf); in visit_symlink()
324 fi->name = xmprintf("%s (readlink: %s)", toybuf, strerror(errno)); in visit_symlink()
338 snprintf(toybuf, sizeof(toybuf), "/proc/%d/maps", pi->pid); in visit_maps()
339 fp = fopen(toybuf, "r"); in visit_maps()
368 snprintf(toybuf, sizeof(toybuf), "/proc/%d/fd", pi->pid); in visit_fds()
369 if (!(dir = opendir(toybuf))) { in visit_fds()
372 fi->name = xmprintf("%s (opendir: %s)", toybuf, strerror(errno)); in visit_fds()
393 sprintf(toybuf, "/proc/%d/stat", pid); in lsof_pid()
394 if (!readfile(toybuf, toybuf, sizeof(toybuf)-1) || !(s = strchr(toybuf, '('))) in lsof_pid()
402 snprintf(toybuf, sizeof(toybuf), "/proc/%d", pid); in lsof_pid()
403 if (stat(toybuf, st = &sb)) return; in lsof_pid()