Lines Matching refs:fp
165 FILE *fp = fopen(path, mode); in fopen_path() local
166 return fp; in fopen_path()
182 check_and_fclose(FILE *fp, const char *name) { in check_and_fclose() argument
183 fflush(fp); in check_and_fclose()
184 if (ferror(fp)) LOGE("Error in %s\n(%s)\n", name, strerror(errno)); in check_and_fclose()
185 fclose(fp); in check_and_fclose()
226 FILE *fp = fopen_path(COMMAND_FILE, "r"); in get_args() local
227 if (fp != NULL) { in get_args()
235 if (!fgets(buf, sizeof(buf), fp)) break; in get_args()
244 check_and_fclose(fp, COMMAND_FILE); in get_args()
375 FILE *fp = fopen_path(INTENT_FILE, "w"); in finish_recovery() local
376 if (fp == NULL) { in finish_recovery()
379 fputs(send_intent, fp); in finish_recovery()
380 check_and_fclose(fp, INTENT_FILE); in finish_recovery()
389 FILE* fp = fopen_path(LOCALE_FILE, "w"); in finish_recovery() local
390 fwrite(locale, 1, strlen(locale), fp); in finish_recovery()
391 fflush(fp); in finish_recovery()
392 fsync(fileno(fp)); in finish_recovery()
393 check_and_fclose(fp, LOCALE_FILE); in finish_recovery()
871 FILE* fp = fopen_path(LOCALE_FILE, "r"); in load_locale_from_cache() local
873 if (fp != NULL) { in load_locale_from_cache()
874 fgets(buffer, sizeof(buffer), fp); in load_locale_from_cache()
884 check_and_fclose(fp, LOCALE_FILE); in load_locale_from_cache()