Home
last modified time | relevance | path

Searched refs:temp_filename (Results 1 – 2 of 2) sorted by relevance

/system/bt/osi/src/
Dconfig.cc280 const std::string temp_filename = filename + ".new"; in config_save() local
297 fp = fopen(temp_filename.c_str(), "wt"); in config_save()
299 LOG(ERROR) << __func__ << ": unable to write to file '" << temp_filename in config_save()
314 LOG(ERROR) << __func__ << ": unable to write to file '" << temp_filename in config_save()
322 << temp_filename << "': " << strerror(errno); in config_save()
329 LOG(WARNING) << __func__ << ": unable to fsync file '" << temp_filename in config_save()
334 LOG(ERROR) << __func__ << ": unable to close file '" << temp_filename in config_save()
341 if (chmod(temp_filename.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) == in config_save()
349 if (rename(temp_filename.c_str(), filename.c_str()) == -1) { in config_save()
372 unlink(temp_filename.c_str()); in config_save()
[all …]
/system/core/init/
Dpersistent_properties.cpp144 const std::string temp_filename = persistent_property_filename + ".tmp"; in ReadPersistentPropertyFile() local
145 if (access(temp_filename.c_str(), F_OK) == 0) { in ReadPersistentPropertyFile()
149 unlink(temp_filename.c_str()); in ReadPersistentPropertyFile()
174 const std::string temp_filename = persistent_property_filename + ".tmp"; in WritePersistentPropertyFile() local
176 open(temp_filename.c_str(), O_WRONLY | O_CREAT | O_NOFOLLOW | O_TRUNC | O_CLOEXEC, 0600))); in WritePersistentPropertyFile()
190 if (rename(temp_filename.c_str(), persistent_property_filename.c_str())) { in WritePersistentPropertyFile()
192 unlink(temp_filename.c_str()); in WritePersistentPropertyFile()