Lines Matching full:proc
39 char path[] = "/proc/self/ns/time_for_children"; in init_namespaces()
71 FILE *proc; in read_proc_uptime() local
73 proc = fopen("/proc/uptime", "r"); in read_proc_uptime()
74 if (proc == NULL) { in read_proc_uptime()
75 pr_perror("Unable to open /proc/uptime"); in read_proc_uptime()
79 if (fscanf(proc, "%lu.%02lu", &up_sec, &up_nsec) != 2) { in read_proc_uptime()
84 pr_err("failed to parse /proc/uptime"); in read_proc_uptime()
87 fclose(proc); in read_proc_uptime()
96 FILE *proc; in read_proc_stat_btime() local
99 proc = fopen("/proc/stat", "r"); in read_proc_stat_btime()
100 if (proc == NULL) { in read_proc_stat_btime()
101 pr_perror("Unable to open /proc/stat"); in read_proc_stat_btime()
105 while (fgets(line_buf, 2048, proc)) { in read_proc_stat_btime()
108 fclose(proc); in read_proc_stat_btime()
113 fclose(proc); in read_proc_stat_btime()
116 pr_err("failed to parse /proc/stat"); in read_proc_stat_btime()
117 fclose(proc); in read_proc_stat_btime()
141 pr_fail("uptime in /proc/uptime: old %ld, new %ld [%ld]", in check_uptime()
147 ksft_test_result_pass("Passed for /proc/uptime\n"); in check_uptime()
170 pr_fail("btime in /proc/stat: old %llu, new %llu [%llu]", in check_stat_btime()
175 ksft_test_result_pass("Passed for /proc/stat btime\n"); in check_stat_btime()