Lines Matching refs:toybuf
94 snprintf(toybuf, sizeof(toybuf), "/proc/%d/fdinfo/%s", fi->pi.pid, fi->fd);
95 fp = fopen(toybuf, "r");
312 snprintf(toybuf, sizeof(toybuf), "/proc/%d/%s", pi->pid, path);
315 fill_flags(fi); // Clobbers toybuf.
316 snprintf(toybuf, sizeof(toybuf), "/proc/%d/fd/%s", pi->pid, path);
319 // rely on toybuf being preserved here.
320 fill_stat(fi, toybuf);
322 fi->name = xreadlink(toybuf);
324 fi->name = xmprintf("%s (readlink: %s)", toybuf, strerror(errno));
338 snprintf(toybuf, sizeof(toybuf), "/proc/%d/maps", pi->pid);
339 fp = fopen(toybuf, "r");
366 snprintf(toybuf, sizeof(toybuf), "/proc/%d/fd", pi->pid);
367 if (!(dir = opendir(toybuf))) {
370 fi->name = xmprintf("%s (opendir: %s)", toybuf, strerror(errno));
391 sprintf(toybuf, "/proc/%d/stat", pid);
392 if (!readfile(toybuf, toybuf, sizeof(toybuf)-1) || !(s = strchr(toybuf, '(')))
400 snprintf(toybuf, sizeof(toybuf), "/proc/%d", pid);
401 if (stat(toybuf, st = &sb)) return;