Searched refs:dir_fd (Results 1 – 6 of 6) 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/vold/bench/inodeop_bench/ |
D | inodeop_bench.cpp | 150 int dir_fd = open(dir.c_str(), OPEN_DIR_FLAGS); in delete_files() local 151 if (dir_fd == -1) { in delete_files() 161 ret = ret && (unlinkat(dir_fd, filename.c_str(), 0) == 0); in delete_files() 165 close(dir_fd); in delete_files() 170 int dir_fd = open(dir.c_str(), OPEN_DIR_FLAGS); in create_files() local 171 if (dir_fd == -1) { in create_files() 181 int fd = openat(dir_fd, filename.c_str(), O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC, 0777); in create_files() 186 close(dir_fd); in create_files()
|
/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()
|
/system/core/debuggerd/tombstoned/ |
D | tombstoned.cpp | 193 borrowed_fd dir_fd() { return dir_fd_; } in dir_fd() function in CrashQueue 458 if (rename_tombstone_fd(crash->output.text.fd, queue->dir_fd(), paths.text)) { in crash_completed() 473 rename_tombstone_fd(crash->output.proto->fd, queue->dir_fd(), *paths.proto); in crash_completed() 479 rc = unlinkat(queue->dir_fd().get(), crash->output.text.temporary_path->c_str(), 0); in crash_completed() 485 rc = unlinkat(queue->dir_fd().get(), crash->output.proto->temporary_path->c_str(), 0); in crash_completed()
|