Home
last modified time | relevance | path

Searched refs:TEMP_FAILURE_RETRY (Results 1 – 25 of 53) sorted by relevance

123

/frameworks/base/cmds/incidentd/src/
DFdBuffer.cpp71 int count = TEMP_FAILURE_RETRY(poll(&pfds, 1, remainingTime)); in read()
84 ssize_t amt = TEMP_FAILURE_RETRY( in read()
121 TEMP_FAILURE_RETRY(::read(fd, mBuffer->writeBuffer(), mBuffer->currentToWrite())); in readFully()
177 int count = TEMP_FAILURE_RETRY(poll(pfds, 3, remainingTime)); in readProcessedDataInStream()
203 amt = TEMP_FAILURE_RETRY(::read(fd, cirBuf + rpos, BUFFER_SIZE - rpos)); in readProcessedDataInStream()
205 amt = TEMP_FAILURE_RETRY(::read(fd, cirBuf + rpos, wpos - rpos)); in readProcessedDataInStream()
225 amt = TEMP_FAILURE_RETRY(::write(toFd.get(), cirBuf + wpos, rpos - wpos)); in readProcessedDataInStream()
227 amt = TEMP_FAILURE_RETRY(::write(toFd.get(), cirBuf + wpos, BUFFER_SIZE - wpos)); in readProcessedDataInStream()
256 ssize_t amt = TEMP_FAILURE_RETRY( in readProcessedDataInStream()
Dincidentd_util.cpp71 if (input != NULL && (TEMP_FAILURE_RETRY(dup2(input->readFd().get(), STDIN_FILENO)) < 0 || in fork_execute_cmd()
76 if (TEMP_FAILURE_RETRY(dup2(output->writeFd().get(), STDOUT_FILENO)) < 0 || in fork_execute_cmd()
/frameworks/opt/net/wifi/libwifi_hal/
Dwifi_hal_common.cpp59 fd = TEMP_FAILURE_RETRY(open(filename, O_RDONLY | O_CLOEXEC | O_NOFOLLOW)); in insmod()
99 fd = TEMP_FAILURE_RETRY(open(WIFI_DRIVER_STATE_CTRL_PARAM, O_WRONLY)); in wifi_change_driver_state()
105 if (TEMP_FAILURE_RETRY(write(fd, state, len)) != len) { in wifi_change_driver_state()
241 fd = TEMP_FAILURE_RETRY(open(WIFI_DRIVER_FW_PATH_PARAM, O_WRONLY)); in wifi_change_fw_path()
247 if (TEMP_FAILURE_RETRY(write(fd, fwpath, len)) != len) { in wifi_change_fw_path()
/frameworks/base/cmds/statsd/tests/storage/
DStorageManager_test.cpp135 android::base::unique_fd fd(TEMP_FAILURE_RETRY( in prepareLocalHistoryTestFiles()
143 android::base::unique_fd fd2(TEMP_FAILURE_RETRY( in prepareLocalHistoryTestFiles()
154 TEMP_FAILURE_RETRY(remove(file1.c_str())); in clearLocalHistoryTestFiles()
155 TEMP_FAILURE_RETRY(remove(file2.c_str())); in clearLocalHistoryTestFiles()
156 TEMP_FAILURE_RETRY(remove(file1_history.c_str())); in clearLocalHistoryTestFiles()
157 TEMP_FAILURE_RETRY(remove(file2_history.c_str())); in clearLocalHistoryTestFiles()
161 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(name.c_str(), O_RDONLY | O_CLOEXEC))); in fileExist()
/frameworks/base/core/jni/
Dfd_utils.cpp219 if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) { in CreateFromFd()
281 const int fd_flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFD)); in CreateFromFd()
301 int fs_flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL)); in CreateFromFd()
310 const off_t offset = TEMP_FAILURE_RETRY(lseek64(fd, 0, SEEK_CUR)); in CreateFromFd()
323 if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) { in RefersToSameFile()
344 const int new_fd = TEMP_FAILURE_RETRY(open(file_path.c_str(), open_flags)); in ReopenOrDetach()
353 if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFD, fd_flags)) == -1) { in ReopenOrDetach()
362 if (TEMP_FAILURE_RETRY(fcntl(new_fd, F_SETFL, fs_flags)) == -1) { in ReopenOrDetach()
371 if (offset != -1 && TEMP_FAILURE_RETRY(lseek64(new_fd, offset, SEEK_SET)) == -1) { in ReopenOrDetach()
380 if (TEMP_FAILURE_RETRY(dup3(new_fd, fd, dup_flags)) == -1) { in ReopenOrDetach()
[all …]
Dcom_android_internal_os_AtomicDirectory.cpp34 if ((fd = TEMP_FAILURE_RETRY(open(path8.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC))) == -1) { in com_android_internal_os_AtomicDirectory_getDirectoryFd()
43 if (TEMP_FAILURE_RETRY(fsync(fd)) == -1) { in com_android_internal_os_AtomicDirectory_fsyncDirectoryFd()
/frameworks/base/cmds/idmap/
Dcreate.cpp35 int fd = TEMP_FAILURE_RETRY(open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)); in open_idmap()
44 if (TEMP_FAILURE_RETRY(flock(fd, LOCK_EX)) != 0) { in open_idmap()
65 ssize_t w = TEMP_FAILURE_RETRY(write(fd, data + size - bytesLeft, bytesLeft)); in write_idmap()
93 ssize_t r = TEMP_FAILURE_RETRY(read(idmap_fd, buf + N - bytesLeft, bytesLeft)); in is_idmap_stale_fd()
147 int idmap_fd = TEMP_FAILURE_RETRY(open(idmap_path, O_RDONLY)); in is_idmap_stale_path()
Didmap.h13 #ifndef TEMP_FAILURE_RETRY
15 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
Dscan.cpp47 if (TEMP_FAILURE_RETRY(flock(fileno(fout), LOCK_EX)) != 0) { in writePackagesList()
52 if (TEMP_FAILURE_RETRY(ftruncate(fileno(fout), 0)) != 0) { in writePackagesList()
53 TEMP_FAILURE_RETRY(flock(fileno(fout), LOCK_UN)); in writePackagesList()
63 TEMP_FAILURE_RETRY(fflush(fout)); in writePackagesList()
64 TEMP_FAILURE_RETRY(flock(fileno(fout), LOCK_UN)); in writePackagesList()
/frameworks/opt/net/wifi/libwifi_system_iface/
Dinterface_tool.cpp45 if (TEMP_FAILURE_RETRY(ioctl(sock, SIOCGIFFLAGS, ifr)) != 0) { in GetIfState()
96 if (TEMP_FAILURE_RETRY(ioctl(sock.get(), SIOCSIFFLAGS, &ifr)) != 0) { in SetUpState()
129 if (TEMP_FAILURE_RETRY(ioctl(sock.get(), SIOCSIFHWADDR, &ifr)) != 0) { in SetMacAddress()
165 if (TEMP_FAILURE_RETRY(ioctl(sock.get(), SIOCETHTOOL, &ifr)) != 0) { in GetFactoryMacAddress()
/frameworks/base/tools/aapt2/io/
DFileStream.cpp43 fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode))); in FileInputStream()
74 ssize_t n = TEMP_FAILURE_RETRY(read(fd_, buffer_.get(), buffer_capacity_)); in Next()
114 owned_fd_.reset(TEMP_FAILURE_RETRY(::android::base::utf8::open(path.c_str(), mode, 0666))); in FileOutputStream()
181 ssize_t n = TEMP_FAILURE_RETRY(write(fd_, buffer_.get(), buffer_offset_)); in FlushImpl()
/frameworks/av/media/mtp/
DMtpFfsCompatHandle.cpp76 int n = TEMP_FAILURE_RETRY(::write(fd, buf, write_len)); in writeHandle()
98 int n = TEMP_FAILURE_RETRY(::read(fd, buf, read_len)); in readHandle()
239 if (TEMP_FAILURE_RETRY(::read(mBulkOut, data, packet_size)) != 0) { in receiveFile()
280 if (TEMP_FAILURE_RETRY(pread(mfr.fd, reinterpret_cast<char*>(data) + in sendFile()
332 if (TEMP_FAILURE_RETRY(::write(mBulkIn, data, 0)) != 0) { in sendFile()
DMtpFfsHandle.cpp89 mBulkIn.reset(TEMP_FAILURE_RETRY(open(ptp ? FFS_PTP_EP_IN : FFS_MTP_EP_IN, O_RDWR))); in openEndpoints()
97 mBulkOut.reset(TEMP_FAILURE_RETRY(open(ptp ? FFS_PTP_EP_OUT : FFS_MTP_EP_OUT, O_RDWR))); in openEndpoints()
105 mIntr.reset(TEMP_FAILURE_RETRY(open(ptp ? FFS_PTP_EP_INTR : FFS_MTP_EP_INTR, O_RDWR))); in openEndpoints()
178 int nbytes = TEMP_FAILURE_RETRY(::read(mControl, event, in handleEvent()
335 … int this_events = TEMP_FAILURE_RETRY(io_getevents(mCtx, 0, AIO_BUFS_MAX, events, &ZERO_TIMEOUT)); in waitEvents()
394 int evs = TEMP_FAILURE_RETRY(io_getevents(mCtx, num_events, AIO_BUFS_MAX, events, nullptr)); in cancelEvents()
590 if (TEMP_FAILURE_RETRY(pread(mfr.fd, mIobuf[0].bufs.data() + in sendFile()
DMtpDescriptors.cpp264 ssize_t ret = TEMP_FAILURE_RETRY(write(fd, in writeDescriptors()
268 ret = TEMP_FAILURE_RETRY(write(fd, in writeDescriptors()
275 ret = TEMP_FAILURE_RETRY(write(fd, &mtp_strings, sizeof(mtp_strings))); in writeDescriptors()
DPosixAsyncIO.cpp50 ret = TEMP_FAILURE_RETRY(pread64(aiocbp->aio_fildes, in work_func()
53 ret = TEMP_FAILURE_RETRY(pwrite64(aiocbp->aio_fildes, in work_func()
DMtpDevHandle.cpp64 mFd.reset(TEMP_FAILURE_RETRY(open(mtp_dev_path, O_RDWR))); in start()
/frameworks/base/cmds/hid/jni/
Dcom_android_commands_hid_Device.cpp127 ssize_t ret = TEMP_FAILURE_RETRY(::write(fd, &ev, sizeof(ev))); in open()
135 ret = TEMP_FAILURE_RETRY(::read(fd, &ev, sizeof(ev))); in open()
164 TEMP_FAILURE_RETRY(::write(mFd, &ev, sizeof(ev))); in ~Device()
179 ssize_t ret = TEMP_FAILURE_RETRY(::write(mFd, &ev, sizeof(ev))); in sendReport()
193 ssize_t ret = TEMP_FAILURE_RETRY(::write(mFd, &ev, sizeof(ev))); in sendGetFeatureReportReply()
206 ssize_t ret = TEMP_FAILURE_RETRY(::read(mFd, &ev, sizeof(ev))); in handleEvents()
/frameworks/base/libs/androidfw/
DObbFile.cpp62 #ifndef TEMP_FAILURE_RETRY
64 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
137 actual = TEMP_FAILURE_RETRY(read(fd, footer, kFooterTagSize)); in parseObbFile()
179 actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, footerSize)); in parseObbFile()
DStreamingZipInflater.cpp34 #ifndef TEMP_FAILURE_RETRY
36 #define TEMP_FAILURE_RETRY(exp) ({ \ macro
213 ssize_t didRead = TEMP_FAILURE_RETRY(::read(mFd, mInBuf, toRead)); in readNextChunk()
/frameworks/native/cmds/bugreport/
Dbugreport.cpp75 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(s, buffer, sizeof(buffer))); in main()
90 bytes_written = TEMP_FAILURE_RETRY(write(STDOUT_FILENO, in main()
/frameworks/native/cmds/lshal/
DPipeRelay.cpp67 int res = TEMP_FAILURE_RETRY(select(mFd + 1, &set, nullptr, nullptr, &timeout)); in threadLoop()
83 ssize_t n = TEMP_FAILURE_RETRY(read(mFd, buffer, sizeof(buffer))); in threadLoop()
/frameworks/native/cmds/dumpstate/
DDumpstateUtil.cpp59 int ret = TEMP_FAILURE_RETRY(sigtimedwait(&child_mask, nullptr, &ts)); in waitpid_with_timeout()
206 …android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_NONBLOCK | O_CLOEXE… in DumpFileToFd()
310 TEMP_FAILURE_RETRY(dup2(STDERR_FILENO, STDOUT_FILENO)); in RunCommandToFd()
313 TEMP_FAILURE_RETRY(dup2(fd, STDOUT_FILENO)); in RunCommandToFd()
Ddumpstate.cpp199 int fd = TEMP_FAILURE_RETRY(open(path.c_str(), flags, mode)); in Open()
214 while ((byte_count = TEMP_FAILURE_RETRY(read(in_fd, buf, sizeof(buf)))) > 0) { in CopyFile()
340TEMP_FAILURE_RETRY(open(abs_path.c_str(), O_RDONLY | O_CLOEXEC | O_NOFOLLOW | O_NONBLOCK))); in GetDumpFds()
776 int rc = TEMP_FAILURE_RETRY(poll(&pfd, 1, time_left_ms())); in AddZipEntryFromFd()
788 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer.data(), buffer.size())); in AddZipEntryFromFd()
814 TEMP_FAILURE_RETRY(open(entry_path.c_str(), O_RDONLY | O_NONBLOCK | O_CLOEXEC))); in AddZipEntry()
942 auto fd = android::base::unique_fd(TEMP_FAILURE_RETRY(open(path.c_str(), in DumpIncidentReport()
1259 TEMP_FAILURE_RETRY(open(path.c_str(), in DumpHals()
1907 android::base::unique_fd fd(TEMP_FAILURE_RETRY( in DumpstateBoard()
2051 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(filepath.c_str(), O_RDONLY | O_NONBLOCK in SHA256_file_hash()
[all …]
DDumpstateInternal.cpp168 int ret = TEMP_FAILURE_RETRY(poll(fds, arraysize(fds), 30 * 1000)); in DumpFileFromFdToFd()
180 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, sizeof(buffer))); in DumpFileFromFdToFd()
/frameworks/native/cmds/bugreportz/
Dbugreportz.cpp49 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(s, buffer, sizeof(buffer))); in bugreportz()

123