Searched refs:dir_fd (Results 1 – 4 of 4) sorted by relevance
/system/bt/gd/os/linux_generic/ |
D | files.cc | 34 void HandleError(const std::string& temp_path, int* dir_fd, FILE** fp) { in HandleError() argument 42 if (*dir_fd != -1) { in HandleError() 43 close(*dir_fd); in HandleError() 44 *dir_fd = -1; in HandleError() 123 int dir_fd = open(directory_path.c_str(), O_RDONLY | O_DIRECTORY); in WriteToFile() local 124 if (dir_fd < 0) { in WriteToFile() 132 HandleError(temp_path, &dir_fd, &fp); in WriteToFile() 138 HandleError(temp_path, &dir_fd, &fp); in WriteToFile() 145 HandleError(temp_path, &dir_fd, &fp); in WriteToFile() 158 HandleError(temp_path, &dir_fd, &fp); in WriteToFile() [all …]
|
/system/bt/osi/src/ |
D | config.cc | 275 int dir_fd = -1; in config_save() local 290 dir_fd = open(directoryname.c_str(), O_RDONLY); in config_save() 291 if (dir_fd < 0) { in config_save() 356 if (fsync(dir_fd) < 0) { in config_save() 361 if (close(dir_fd) < 0) { in config_save() 374 if (dir_fd != -1) close(dir_fd); in config_save() 392 int dir_fd = -1; in checksum_save() local 407 dir_fd = open(directoryname.c_str(), O_RDONLY); in checksum_save() 408 if (dir_fd < 0) { in checksum_save() 457 if (fsync(dir_fd) < 0) { in checksum_save() [all …]
|
/system/security/keystore/ |
D | keystore_utils.cpp | 94 android::base::unique_fd dir_fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_DIRECTORY | O_RDONLY))); in fsyncDirectory() local 96 if (dir_fd < 0) { in fsyncDirectory() 101 if (TEMP_FAILURE_RETRY(fsync(dir_fd)) == -1) { in fsyncDirectory()
|
/system/core/init/ |
D | persistent_properties.cpp | 201 auto dir_fd = unique_fd{open(dir.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC)}; in WritePersistentPropertyFile() 202 if (dir_fd < 0) { in WritePersistentPropertyFile() 205 fsync(dir_fd); in WritePersistentPropertyFile()
|