Lines Matching refs:file
101 static bool file_exists(const char *file) in file_exists() argument
105 fd = open(file, O_RDWR); in file_exists()
107 ALOGE("failed to open %s, errno=%d\n", file, errno); in file_exists()
171 char file[48]; in set_rgb_led_brightness() local
173 snprintf(file, sizeof(file), "/sys/class/leds/%s/brightness", led_names[led]); in set_rgb_led_brightness()
174 return write_int(file, brightness); in set_rgb_led_brightness()
179 char file[48]; in set_rgb_led_timer_trigger() local
182 snprintf(file, sizeof(file), "/sys/class/leds/%s/delay_off", led_names[led]); in set_rgb_led_timer_trigger()
183 rc = write_int(file, offMS); in set_rgb_led_timer_trigger()
187 snprintf(file, sizeof(file), "/sys/class/leds/%s/delay_on", led_names[led]); in set_rgb_led_timer_trigger()
188 rc = write_int(file, onMS); in set_rgb_led_timer_trigger()
200 char file[48]; in set_rgb_led_hw_blink() local
202 snprintf(file, sizeof(file), "/sys/class/leds/%s/breath", led_names[led]); in set_rgb_led_hw_blink()
203 if (!file_exists(file)) in set_rgb_led_hw_blink()
204 snprintf(file, sizeof(file), "/sys/class/leds/%s/blink", led_names[led]); in set_rgb_led_hw_blink()
206 return write_int(file, blink); in set_rgb_led_hw_blink()