Lines Matching refs:fp
118 FILE *fp = fopen_for_write(fname); in write_str_to_file() local
119 if (!fp) in write_str_to_file()
121 fputs(str, fp); in write_str_to_file()
122 fclose(fp); in write_str_to_file()
172 FILE *fp; in read_cstate_counts() local
182 fp = fopen_for_read(buf); in read_cstate_counts()
183 if (!fp) in read_cstate_counts()
195 while (fgets(buf, sizeof(buf), fp)) { in read_cstate_counts()
213 fclose(fp); in read_cstate_counts()
247 FILE *fp; in is_hpet_irq() local
251 fp = fopen_for_read("/proc/timer_list"); in is_hpet_irq()
252 if (!fp) in is_hpet_irq()
255 while (fgets(buf, sizeof(buf), fp)) { in is_hpet_irq()
268 fclose(fp); in is_hpet_irq()
311 FILE *fp; in process_irq_counts() local
318 fp = xfopen_for_read("/proc/interrupts"); in process_irq_counts()
319 while (fgets(buf, sizeof(buf), fp)) { in process_irq_counts()
394 fclose(fp); in process_irq_counts()
405 FILE *fp; in process_timer_stats() local
410 fp = NULL; in process_timer_stats()
412 fp = fopen_for_read("/proc/timer_stats"); in process_timer_stats()
413 if (fp) { in process_timer_stats()
425 while (fgets(buf, sizeof(buf), fp)) { in process_timer_stats()
494 fclose(fp); in process_timer_stats()
563 FILE *fp; in print_intel_cstates() local
572 fp = fopen_for_read(fname); in print_intel_cstates()
573 if (fp) { in print_intel_cstates()
574 char *p = fgets(buf, sizeof(buf), fp); in print_intel_cstates()
575 fclose(fp); in print_intel_cstates()