• Home
  • Raw
  • Download

Lines Matching refs:file

37 	FILE *file;  in set_laptop_mode()  local
38 file = fopen("/proc/sys/vm/laptop_mode", "w"); in set_laptop_mode()
39 if (!file) in set_laptop_mode()
41 fprintf(file,"5\n"); in set_laptop_mode()
42 fclose(file); in set_laptop_mode()
47 FILE *file; in suggest_laptop_mode() local
56 file = fopen("/proc/acpi/ac_adapter/AC/state", "r"); in suggest_laptop_mode()
57 if (!file) in suggest_laptop_mode()
60 if (!fgets(buffer, 1023, file)) { in suggest_laptop_mode()
61 fclose(file); in suggest_laptop_mode()
64 fclose(file); in suggest_laptop_mode()
69 file = fopen("/proc/sys/vm/laptop_mode", "r"); in suggest_laptop_mode()
70 if (!file) in suggest_laptop_mode()
73 if (!fgets(buffer, 1023, file)) { in suggest_laptop_mode()
74 fclose(file); in suggest_laptop_mode()
82 fclose(file); in suggest_laptop_mode()
87 FILE *file; in nmi_watchdog_off() local
88 file = fopen("/proc/sys/kernel/nmi_watchdog", "w"); in nmi_watchdog_off()
89 if (!file) in nmi_watchdog_off()
91 fprintf(file,"0\n"); in nmi_watchdog_off()
92 fclose(file); in nmi_watchdog_off()
96 FILE *file; in suggest_nmi_watchdog() local
99 file = fopen("/proc/sys/kernel/nmi_watchdog", "r"); in suggest_nmi_watchdog()
100 if (!file) in suggest_nmi_watchdog()
103 if (!fgets(buffer, 1023, file)) { in suggest_nmi_watchdog()
104 fclose(file); in suggest_nmi_watchdog()
113 fclose(file); in suggest_nmi_watchdog()
118 FILE *file; in suggest_hpet() local
120 file = fopen("/sys/devices/system/clocksource/clocksource0/available_clocksource", "r"); in suggest_hpet()
121 if (!file) in suggest_hpet()
125 if (!fgets(buffer, 1023, file)) { in suggest_hpet()
126 fclose(file); in suggest_hpet()
131 fclose(file); in suggest_hpet()
135 fclose(file); in suggest_hpet()
144 FILE *file; in ac97_power_on() local
145 file = fopen("/sys/module/snd_ac97_codec/parameters/power_save", "w"); in ac97_power_on()
146 if (!file) in ac97_power_on()
148 fprintf(file,"1"); in ac97_power_on()
149 fclose(file); in ac97_power_on()
152 file = fopen("/dev/dsp", "w"); in ac97_power_on()
153 if (file) { in ac97_power_on()
154 fprintf(file,"1"); in ac97_power_on()
155 fclose(file); in ac97_power_on()
161 FILE *file; in suggest_ac97_powersave() local
163 file = fopen("/sys/module/snd_ac97_codec/parameters/power_save", "r"); in suggest_ac97_powersave()
164 if (!file) in suggest_ac97_powersave()
167 if (!fgets(buffer, 1023, file)) { in suggest_ac97_powersave()
168 fclose(file); in suggest_ac97_powersave()
176 fclose(file); in suggest_ac97_powersave()
186 FILE *file; in suggest_noatime() local
189 file = fopen("/proc/mounts","r"); in suggest_noatime()
190 if (!file) in suggest_noatime()
192 while (!feof(file)) { in suggest_noatime()
194 if (!fgets(buffer, 1023, file)) in suggest_noatime()
205 fclose(file); in suggest_noatime()
210 FILE *file; in powersched_on() local
211 file = fopen("/sys/devices/system/cpu/sched_mc_power_savings", "w"); in powersched_on()
212 if (!file) in powersched_on()
214 fprintf(file,"1"); in powersched_on()
215 fclose(file); in powersched_on()
220 FILE *file; in suggest_powersched() local
225 file = fopen("/sys/devices/system/cpu/sched_mc_power_savings","r"); in suggest_powersched()
226 if (!file) in suggest_powersched()
229 if (!fgets(buffer, 1023, file)) { in suggest_powersched()
230 fclose(file); in suggest_powersched()
233 fclose(file); in suggest_powersched()
242 file = fopen("/proc/cpuinfo", "r"); in suggest_powersched()
244 if (!file) in suggest_powersched()
246 while (!feof(file)) { in suggest_powersched()
249 if (!fgets(buffer, 1023, file)) in suggest_powersched()
260 fclose(file); in suggest_powersched()
273 FILE *file; in writeback_long() local
274 file = fopen("/proc/sys/vm/dirty_writeback_centisecs", "w"); in writeback_long()
275 if (!file) in writeback_long()
277 fprintf(file,"1500"); in writeback_long()
278 fclose(file); in writeback_long()
283 FILE *file; in suggest_writeback_time() local
286 file = fopen("/proc/sys/vm/dirty_writeback_centisecs", "r"); in suggest_writeback_time()
287 if (!file) in suggest_writeback_time()
290 if (!fgets(buffer, 1023, file)) { in suggest_writeback_time()
291 fclose(file); in suggest_writeback_time()
303 fclose(file); in suggest_writeback_time()