Lines Matching refs:filename
69 static int read_to_buf(const char *filename, void *buf) in read_to_buf() argument
75 fd = open(filename, O_RDONLY); in read_to_buf()
184 char filename[sizeof("/proc/%u/smaps") + sizeof(int)*3]; in procps_read_smaps() local
191 sprintf(filename, "/proc/%u/smaps", (int)pid); in procps_read_smaps()
193 file = fopen_for_read(filename); in procps_read_smaps()
293 char filename[sizeof("/proc/%u/task/%u/cmdline") + sizeof(int)*3 * 2]; in procps_scan() local
319 sprintf(filename, "/proc/%u/task", pid); in procps_scan()
321 sp->task_dir = opendir(filename); in procps_scan()
347 filename_tail = filename + sprintf(filename, "/proc/%u/task/%u/", sp->main_thread_pid, pid); in procps_scan()
350 filename_tail = filename + sprintf(filename, "/proc/%u/", pid); in procps_scan()
354 if (stat(filename, &sb)) in procps_scan()
377 n = read_to_buf(filename, buf); in procps_scan()
493 file = fopen_for_read(filename); in procps_scan()
514 sp->exe = xmalloc_readlink(filename); in procps_scan()
531 n = read_to_buf(filename, buf); in procps_scan()
550 n = read_to_buf(filename, buf); in procps_scan()
572 char filename[sizeof("/proc/%u/cmdline") + sizeof(int)*3]; in read_cmdline() local
574 sprintf(filename, "/proc/%u/cmdline", pid); in read_cmdline()
575 sz = open_read_close(filename, buf, col - 1); in read_cmdline()