Home
last modified time | relevance | path

Searched refs:fd_ (Results 1 – 13 of 13) sorted by relevance

/frameworks/native/libs/vr/libpdx/private/pdx/
Dfile_handle.h25 FileHandle() : fd_(kEmptyFileHandle) {} in FileHandle()
29 explicit FileHandle(int fd) : fd_(fd) {} in FileHandle()
34 fd_ = open(path.c_str(), flags, mode);
41 fd_ = openat(directory_fd, path.c_str(), flags, mode);
47 fd_ = other.fd_; in FileHandle()
48 other.fd_ = kEmptyFileHandle; in FileHandle()
67 Reset(other.fd_);
68 other.fd_ = kEmptyFileHandle;
76 fd_ = fd; in Reset()
82 close(fd_); in Close()
[all …]
/frameworks/native/include/binder/
Dunique_fd.h59 int fd = s.fd_;
60 s.fd_ = -1;
68 if (fd_ != -1) {
69 ::close(fd_);
72 fd_ = new_value;
76 int get() const { return fd_; } in get()
81 int ret = fd_; in release()
82 fd_ = -1; in release()
87 int fd_ = -1;
105 /* implicit */ borrowed_fd(int fd) : fd_(fd) {} // NOLINT in borrowed_fd()
[all …]
/frameworks/native/libs/binder/include/binder/
Dunique_fd.h59 int fd = s.fd_;
60 s.fd_ = -1;
68 if (fd_ != -1) {
69 ::close(fd_);
72 fd_ = new_value;
76 int get() const { return fd_; } in get()
81 int ret = fd_; in release()
82 fd_ = -1; in release()
87 int fd_ = -1;
105 /* implicit */ borrowed_fd(int fd) : fd_(fd) {} // NOLINT in borrowed_fd()
[all …]
/frameworks/base/libs/androidfw/
DFileStream.cpp43 fd_ = TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode)); in FileInputStream()
44 if (fd_ == -1) { in FileInputStream()
52 : fd_(fd), should_close_(true), buffer_capacity_(buffer_capacity) { in FileInputStream()
53 if (fd_ < 0) { in FileInputStream()
61 : fd_(fd.get()), should_close_(false), buffer_capacity_(buffer_capacity) { in FileInputStream()
63 if (fd_ < 0) { in FileInputStream()
85 ssize_t n = TEMP_FAILURE_RETRY(read(fd_, buffer_.get(), buffer_capacity_)); in Next()
88 if (fd_ != -1) { in Next()
90 close(fd_); in Next()
92 fd_ = -1; in Next()
[all …]
/frameworks/libs/binary_translation/tests/ndk_program_tests/include/berberis/ndk_program_tests/
Dfile.h46 fd_ = mkstemp(file_name_); in TempFile()
47 if (fd_ < 0) { in TempFile()
50 file_ = fdopen(fd_, "r+"); in TempFile()
63 int fd() const { return fd_; } in fd()
70 int fd_; variable
/frameworks/libs/binary_translation/tests/ndk_program_tests/
Dfile.h50 fd_ = mkstemp(file_name_); in TempFile()
51 if (fd_ < 0) { in TempFile()
55 file_ = fdopen(fd_, "r+"); in TempFile()
68 int fd() { return fd_; } in fd()
75 int fd_; variable
/frameworks/base/libs/androidfw/include/androidfw/
DFileStream.h44 if (should_close_ && (fd_ != -1)) { in ~FileInputStream()
45 close(fd_); in ~FileInputStream()
64 int fd_ = -1; variable
107 int fd_; variable
/frameworks/libs/binary_translation/base/include/berberis/base/
Dtracing.h74 static bool IsOnImpl() { return fd_ != -1; } in IsOnImpl()
82 UNUSED(write(fd_, buf, n)); in TraceImpl()
85 static int fd_; variable
/frameworks/native/services/vr/virtual_touchpad/
DEvdevInjector.cpp16 fd_.reset(open("/dev/uinput", O_WRONLY | O_NONBLOCK)); in Open()
17 if (fd_.get() < 0) { in Open()
18 ALOGE("couldn't open uinput (r=%d errno=%d)", fd_.get(), errno); in Open()
25 fd_.reset(); in Close()
32 ssize_t r = write(fd_.get(), buf, count); in Write()
42 if (const int status = ioctl(fd_.get(), request, value)) { in IoctlSetInt()
43 ALOGE("ioctl(%d, 0x%X, 0x%X) failed (r=%d errno=%d)", fd_.get(), request, in IoctlSetInt()
52 if (const int status = ioctl(fd_.get(), request)) { in IoctlVoid()
53 ALOGE("ioctl(%d, 0x%X) failed (r=%d errno=%d)", fd_.get(), request, status, in IoctlVoid()
DEvdevInjector.h53 base::unique_fd fd_;
/frameworks/base/tests/FsVerityTest/block_device_writer/
Dblock_device_writer.cpp63 fd_.reset(TEMP_FAILURE_RETRY(open(file_path, O_WRONLY | O_CLOEXEC, 0))); in ScopedF2fsFilePinning()
64 if (fd_.get() == -1) { in ScopedF2fsFilePinning()
69 ioctl(fd_.get(), F2FS_IOC_SET_PIN_FILE, &set); in ScopedF2fsFilePinning()
74 ioctl(fd_.get(), F2FS_IOC_SET_PIN_FILE, &set); in ~ScopedF2fsFilePinning()
78 android::base::unique_fd fd_; member in ScopedF2fsFilePinning
/frameworks/libs/binary_translation/base/
Dtracing.cc117 int Tracing::fd_ = -1; member in berberis::Tracing
137 fd_ = TraceToSocket(env); in InitImpl()
139 fd_ = TraceToFile(env); in InitImpl()
/frameworks/libs/binary_translation/tools/nogrod/
Delf_reader.cc176 int fd_; member in nogrod::__anona7aeaf9f0111::ElfFileImpl
190 : path_(path), fd_(fd), header_(nullptr), shdr_table_(nullptr), shdr_num_(0) {} in ElfFileImpl()
194 close(fd_); in ~ElfFileImpl()
252 if (fstat(fd_, &st) == -1) { in Init()
259 if (!mapped_file_.Map(fd_, 0, 0, size)) { in Init()