Lines Matching refs:temp_filename
298 char *temp_filename = osi_calloc(temp_filename_len); in config_save() local
299 snprintf(temp_filename, temp_filename_len, "%s%s", filename, temp_file_ext); in config_save()
315 fp = fopen(temp_filename, "wt"); in config_save()
317 … LOG_ERROR(LOG_TAG, "%s unable to write file '%s': %s", __func__, temp_filename, strerror(errno)); in config_save()
324 …LOG_ERROR(LOG_TAG, "%s unable to write to file '%s': %s", __func__, temp_filename, strerror(errno)… in config_save()
331 …LOG_ERROR(LOG_TAG, "%s unable to write to file '%s': %s", __func__, temp_filename, strerror(errno)… in config_save()
339 …LOG_ERROR(LOG_TAG, "%s unable to write to file '%s': %s", __func__, temp_filename, strerror(errno)… in config_save()
347 LOG_WARN(LOG_TAG, "%s unable to fsync file '%s': %s", __func__, temp_filename, strerror(errno)); in config_save()
351 … LOG_ERROR(LOG_TAG, "%s unable to close file '%s': %s", __func__, temp_filename, strerror(errno)); in config_save()
357 if (chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) == -1) { in config_save()
363 if (rename(temp_filename, filename) == -1) { in config_save()
378 osi_free(temp_filename); in config_save()
384 unlink(temp_filename); in config_save()
389 osi_free(temp_filename); in config_save()