Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 411) sorted by relevance

12345678910>>...17

/device/google/crosshatch/dumpstate/
DDumpstateDevice.cpp64 void DumpstateDevice::dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument
100 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs()
110 void DumpstateDevice::dumpModem(int fd, int fdModem) in dumpModem() argument
128 …RunCommandToFd(fd, "MKDIR MODEM LOG", {"/vendor/bin/mkdir", "-p", modemLogAllDir.c_str()}, Command… in dumpModem()
131 …RunCommandToFd(fd, "MODEM RFS INFO", {"/vendor/bin/find /data/vendor/rfs/mpss/OEMFI/"}, CommandOpt… in dumpModem()
132 …RunCommandToFd(fd, "MODEM DIAG SYSTEM PROPERTIES", {"/vendor/bin/getprop | grep vendor.sys.modem.d… in dumpModem()
163 …RunCommandToFd(fd, "SMLOG DUMP", {"smlog_dump", "-d", "-o", modemLogAllDir.c_str()}, CommandOption… in dumpModem()
179 …dumpLogs(fd, diagLogDir, modemLogAllDir, android::base::GetIntProperty(DIAG_MDLOG_NUMBER_BUGREPORT… in dumpModem()
188 …dumpLogs(fd, tcpdumpLogDir, modemLogAllDir, android::base::GetIntProperty(TCPDUMP_NUMBER_BUGREPORT… in dumpModem()
192 …RunCommandToFd(fd, "CP MODEM LOG", {"/vendor/bin/cp", logFile.c_str(), modemLogAllDir.c_str()}, Co… in dumpModem()
[all …]
/device/google/coral/dumpstate/
DDumpstateDevice.cpp69 void DumpstateDevice::dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument
105 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs()
115 void DumpstateDevice::dumpModem(int fd, int fdModem) in dumpModem() argument
133 …RunCommandToFd(fd, "MKDIR MODEM LOG", {"/vendor/bin/mkdir", "-p", modemLogAllDir.c_str()}, Command… in dumpModem()
136 …RunCommandToFd(fd, "MODEM RFS INFO", {"/vendor/bin/find /data/vendor/rfs/mpss/OEMFI/"}, CommandOpt… in dumpModem()
137 …RunCommandToFd(fd, "MODEM DIAG SYSTEM PROPERTIES", {"/vendor/bin/getprop | grep vendor.sys.modem.d… in dumpModem()
172 …RunCommandToFd(fd, "SMLOG DUMP", {"smlog_dump", "-d", "-o", modemLogAllDir.c_str()}, CommandOption… in dumpModem()
188 …dumpLogs(fd, diagLogDir, modemLogAllDir, android::base::GetIntProperty(DIAG_MDLOG_NUMBER_BUGREPORT… in dumpModem()
197 …dumpLogs(fd, tcpdumpLogDir, modemLogAllDir, android::base::GetIntProperty(TCPDUMP_NUMBER_BUGREPORT… in dumpModem()
201 …RunCommandToFd(fd, "CP MODEM LOG", {"/vendor/bin/cp", logFile.c_str(), modemLogAllDir.c_str()}, Co… in dumpModem()
[all …]
/device/google/bonito/dumpstate/
DDumpstateDevice.cpp64 static void dumpLogs(int fd, std::string srcDir, std::string destDir, in dumpLogs() argument
100 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpLogs()
237 static void DumpIPCTRT(int fd) { in DumpIPCTRT() argument
238 DumpFileToFd(fd, "MPSS IPCRTR Log", "/sys/kernel/debug/ipc_logging/mpss_IPCRTR/log"); in DumpIPCTRT()
239 DumpFileToFd(fd, "Local IPCRTR Log", "/sys/kernel/debug/ipc_logging/local_IPCRTR/log"); in DumpIPCTRT()
242 static void DumpTouch(int fd) { in DumpTouch() argument
245 DumpFileToFd(fd, "Synaptics touch firmware version", in DumpTouch()
247 DumpFileToFd(fd, "Synaptics touch config version", in DumpTouch()
249 RunCommandToFd(fd, "keep touch stay awake", in DumpTouch()
252 DumpFileToFd(fd, "Synaptics touch noise information", in DumpTouch()
[all …]
/device/google/wahoo/dumpstate/
DDumpstateDevice.cpp57 void DumpstateDevice::dumpDiagLogs(int fd, std::string srcDir, std::string destDir) { in dumpDiagLogs() argument
93 RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpDiagLogs()
103 void DumpstateDevice::dumpModem(int fd, int fdModem) in dumpModem() argument
115 RunCommandToFd(fd, "MODEM DIAG SYSTEM PROPERTIES", in dumpModem()
132 …RunCommandToFd(fd, "MKDIR MODEM LOG", { "/vendor/bin/sh", "-c", modemLogMkDirCmd.c_str()}, options… in dumpModem()
140 … RunCommandToFd(fd, "SMLOG DUMP", { "smlog_dump", "-d", "-o", modemLogAllDir.c_str() }, options); in dumpModem()
161 dumpDiagLogs(fd, diagLogDir, modemLogAllDir); in dumpModem()
172 … RunCommandToFd(fd, "CP MODEM LOG", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options); in dumpModem()
180 … RunCommandToFd(fd, "TAR LOG", { "/vendor/bin/sh", "-c", modemLogTarCmd.c_str()}, options); in dumpModem()
183 … RunCommandToFd(fd, "CHG PERM", { "/vendor/bin/sh", "-c", modemLogPermCmd.c_str()}, options); in dumpModem()
[all …]
/device/generic/goldfish/tnc/
Dmain.cpp41 int fd = -1; in runClient() local
43 fd = ::socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol); in runClient()
44 if (fd < 0) { in runClient()
47 if (::connect(fd, addr->ai_addr, addr->ai_addrlen) == 0) { in runClient()
50 ::close(fd); in runClient()
53 if (fd < 0) { in runClient()
57 if (::send(fd, "boop", 4, 0) != 4) { in runClient()
58 ::close(fd); in runClient()
62 ::close(fd); in runClient()
67 int fd = -1; in runServer() local
[all …]
/device/google/cuttlefish/common/libs/fs/
Dshared_buf.cc33 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size) { in WriteAll() argument
36 while ((written = fd->Write((void*)&(buf[total_written]), size - total_written)) > 0) { in WriteAll()
38 errno = fd->GetErrno(); in WriteAll()
49 ssize_t ReadExact(SharedFD fd, char* buf, size_t size) { in ReadExact() argument
52 while ((read = fd->Read((void*)&(buf[total_read]), size - total_read)) > 0) { in ReadExact()
54 errno = fd->GetErrno(); in ReadExact()
65 ssize_t ReadAll(SharedFD fd, std::string* buf) { in ReadAll() argument
69 while ((read = fd->Read(buff, BUFF_SIZE - 1)) > 0) { in ReadAll()
74 errno = fd->GetErrno(); in ReadAll()
81 ssize_t ReadExact(SharedFD fd, std::string* buf) { in ReadExact() argument
[all …]
Dshared_buf.h33 ssize_t ReadAll(SharedFD fd, std::string* buf);
43 ssize_t ReadExact(SharedFD fd, std::string* buf);
53 ssize_t ReadExact(SharedFD fd, std::vector<char>* buf);
63 ssize_t ReadExact(SharedFD fd, char* buf, size_t size);
74 ssize_t ReadExactBinary(SharedFD fd, T* binary_data) { in ReadExactBinary() argument
75 return ReadExact(fd, (char*) binary_data, sizeof(*binary_data)); in ReadExactBinary()
86 ssize_t WriteAll(SharedFD fd, const std::string& buf);
96 ssize_t WriteAll(SharedFD fd, const std::vector<char>& buf);
106 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size);
117 ssize_t WriteAllBinary(SharedFD fd, const T* binary_data) { in WriteAllBinary() argument
[all …]
/device/linaro/dragonboard/qcom/rmtfs/
Dsharedmem.c26 int fd; member
61 int fd; in rmtfs_mem_open_rfsa() local
65 fd = open(path, O_RDWR); in rmtfs_mem_open_rfsa()
66 if (fd < 0) { in rmtfs_mem_open_rfsa()
71 rmem->fd = fd; in rmtfs_mem_open_rfsa()
73 ret = fstat(fd, &sb); in rmtfs_mem_open_rfsa()
77 close(fd); in rmtfs_mem_open_rfsa()
119 close(fd); in rmtfs_mem_open_rfsa()
131 int fd; in rmtfs_mem_open_uio() local
135 fd = open(path, O_RDWR); in rmtfs_mem_open_uio()
[all …]
Dstorage.c27 int fd; member
68 rmtfds[i].fd = -1; in storage_init()
84 int fd; in storage_open() local
98 if ((rmtfds[i].fd != -1 || rmtfds[i].shadow_buf) && in storage_open()
105 if (rmtfds[i].fd == -1 && !rmtfds[i].shadow_buf) { in storage_open()
124 fd = open(fspath, O_RDWR); in storage_open()
125 if (fd < 0) { in storage_open()
132 rmtfd->fd = fd; in storage_open()
153 close(rmtfd->fd); in storage_close()
154 rmtfd->fd = -1; in storage_close()
[all …]
/device/linaro/hikey/hifi/xaf/host-apf/proxy/
Dxf-fio.c68 int fd = ipc->fd; in xf_ipc_send() local
74 XF_CHK_ERR(write(fd, msg, sizeof(*msg)) == sizeof(*msg), -errno); in xf_ipc_send()
76 …ret = ioctl(fd, HIFI_MISC_IOCTL_XAF_IPC_MSG_SEND, msg);// GJB:-Verify th return value with driver … in xf_ipc_send()
86 int fd = ipc->fd; in xf_ipc_wait() local
92 FD_SET(fd, &rfds); in xf_ipc_wait()
99 select(fd+1,&rfds,NULL,NULL,(timeout? &tv: NULL)); in xf_ipc_wait()
102 return (FD_ISSET(fd, &rfds) ? 0 : -ETIMEDOUT); in xf_ipc_wait()
108 int fd = ipc->fd; in xf_ipc_recv() local
113 if ((r = read(fd, msg, sizeof(*msg))) == sizeof(*msg)) in xf_ipc_recv()
124 if ((r = ioctl(fd, HIFI_MISC_IOCTL_XAF_IPC_MSG_RECV, &temp)) == sizeof(temp)) in xf_ipc_recv()
[all …]
/device/google/bonito/gpt-utils/
Dgpt-utils.cpp145 static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) in blk_rw() argument
149 if (lseek64(fd, offset, SEEK_SET) < 0) { in blk_rw()
156 r = write(fd, buf, len); in blk_rw()
158 r = read(fd, buf, len); in blk_rw()
282 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument
296 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain()
308 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain()
317 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain()
337 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain()
349 r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); in gpt2_set_boot_chain()
[all …]
/device/google/crosshatch/gpt-utils/
Dgpt-utils.cpp145 static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) in blk_rw() argument
149 if (lseek64(fd, offset, SEEK_SET) < 0) { in blk_rw()
156 r = write(fd, buf, len); in blk_rw()
158 r = read(fd, buf, len); in blk_rw()
282 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument
296 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain()
308 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain()
317 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain()
337 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain()
349 r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); in gpt2_set_boot_chain()
[all …]
/device/google/coral/gpt-utils/
Dgpt-utils.cpp145 static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) in blk_rw() argument
149 if (lseek64(fd, offset, SEEK_SET) < 0) { in blk_rw()
156 r = write(fd, buf, len); in blk_rw()
158 r = read(fd, buf, len); in blk_rw()
282 static int gpt2_set_boot_chain(int fd, enum boot_chain boot) in gpt2_set_boot_chain() argument
296 if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { in gpt2_set_boot_chain()
308 gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; in gpt2_set_boot_chain()
317 r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); in gpt2_set_boot_chain()
337 r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); in gpt2_set_boot_chain()
349 r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); in gpt2_set_boot_chain()
[all …]
/device/amlogic/yukawa/hal/lights/
Dlights.cpp66 static int sys_write_int(int fd, int value) { in sys_write_int() argument
73 amount = write(fd, buffer, bytes); in sys_write_int()
77 static int write8reg8(int fd, uint8_t regaddr, uint8_t cmd) { in write8reg8() argument
82 if (write(fd, buf, 2) != 2) return -1; in write8reg8()
106 int const fd = open(path, O_RDWR); in writeLedArray() local
107 if (fd < 0) { in writeLedArray()
109 return fd; in writeLedArray()
111 if (ioctl(fd, I2C_SLAVE, i2c_dev_addr) < 0) { in writeLedArray()
113 close(fd); in writeLedArray()
117 write8reg8(fd, addr.red, ((color >> 16) & 0xFF)); in writeLedArray()
[all …]
/device/generic/goldfish/sensors/
Dmultihal_sensors_epoll.cpp24 int epollCtlAdd(int epollFd, int fd) { in epollCtlAdd() argument
27 ev.data.fd = fd; in epollCtlAdd()
28 return TEMP_FAILURE_RETRY(epoll_ctl(epollFd, EPOLL_CTL_ADD, fd, &ev)); in epollCtlAdd()
31 int qemuSensortThreadRcvCommand(const int fd) { in qemuSensortThreadRcvCommand() argument
33 if (TEMP_FAILURE_RETRY(read(fd, &buf, 1)) == 1) { in qemuSensortThreadRcvCommand()
67 const int fd = ev->data.fd; in qemuSensorListenerThread() local
70 if (fd == m_qemuSensorsFd.get()) { in qemuSensorListenerThread()
78 } else if (fd == m_sensorThreadFd.get()) { in qemuSensorListenerThread()
84 const int cmd = qemuSensortThreadRcvCommand(fd); in qemuSensorListenerThread()
/device/google/cuttlefish/guest/hals/gps/
Dgps_thread.h44 int fd; member
59 static inline int epoll_register(int epoll_fd, int fd) { in epoll_register() argument
60 fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); in epoll_register()
64 ev.data.fd = fd; in epoll_register()
68 ret = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev); in epoll_register()
73 static inline int epoll_deregister(int epoll_fd, int fd) { in epoll_deregister() argument
76 ret = epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, NULL); in epoll_deregister()
/device/generic/goldfish/wifi/wifi_hal/
Dnetlink.cpp33 static void closeIfOpen(int* fd) { in closeIfOpen() argument
34 if (*fd != -1) { in closeIfOpen()
35 ::close(*fd); in closeIfOpen()
36 *fd = -1; in closeIfOpen()
100 fds[0].fd = mSocket; in eventLoop()
102 fds[1].fd = mControlPipe[kControlRead]; in eventLoop()
118 for (auto& fd : fds) { in eventLoop() local
119 if ((fd.revents & POLLIN) == 0) { in eventLoop()
122 if (fd.fd == mSocket) { in eventLoop()
123 readNetlinkMessage(fd.fd); in eventLoop()
[all …]
/device/generic/goldfish/network/netmgr/
Dpoller.cpp95 pollables[fds[i].fd] = pollable; in run()
115 for (const auto& fd : fds) { in run() local
116 if ((fd.revents & (POLLIN | POLLHUP)) == 0) { in run()
120 auto pollable = pollables.find(fd.fd); in run()
123 LOGE("Poller could not find fd matching %d", fd.fd); in run()
126 if (fd.revents & POLLIN) { in run()
129 if (!pollable->second->onReadAvailable(fd.fd, &status)) { in run()
134 if (fd.revents & POLLHUP) { in run()
137 if (!pollable->second->onClose(fd.fd, &status)) { in run()
/device/generic/goldfish/network/wifi_forwarder/
Dpoller.cpp94 pollables[fds[i].fd] = pollable; in run()
114 for (const auto& fd : fds) { in run() local
115 if ((fd.revents & (POLLIN | POLLHUP)) == 0) { in run()
119 auto pollable = pollables.find(fd.fd); in run()
122 ALOGE("Poller could not find fd matching %d", fd.fd); in run()
125 if (fd.revents & POLLIN) { in run()
128 if (!pollable->second->onReadAvailable(fd.fd, &status)) { in run()
133 if (fd.revents & POLLHUP) { in run()
136 if (!pollable->second->onClose(fd.fd, &status)) { in run()
/device/generic/goldfish-opengl/shared/OpenglCodecCommon/
Dgoldfish_dma.cpp58 res->fd = qemu_pipe_open("opengles"); in goldfish_dma_create_region()
62 if (res->fd > 0) { in goldfish_dma_create_region()
66 int alloc_res = ioctl(res->fd, GOLDFISH_DMA_IOC_CREATE_REGION, &info); in goldfish_dma_create_region()
71 close(res->fd); in goldfish_dma_create_region()
72 res->fd = -1; in goldfish_dma_create_region()
78 __FUNCTION__, sz, res, res->fd); in goldfish_dma_create_region()
82 __FUNCTION__, res->fd, errno); in goldfish_dma_create_region()
88 ALOGV("%s: on fd %d errno=%d", __FUNCTION__, cxt->fd, errno); in goldfish_dma_map()
89 void *mapped = mmap(0, cxt->size, PROT_WRITE, MAP_SHARED, cxt->fd, 0); in goldfish_dma_map()
118 close(cxt->fd); in goldfish_dma_free()
[all …]
/device/linaro/hikey/wpan/uim/
Duim.c88 int read_hci_event(int fd, unsigned char *buf, int size) in read_hci_event() argument
105 rd = read(fd, buf, 1); in read_hci_event()
121 rd = read(fd, buf + count, 3 - count); in read_hci_event()
134 rd = read(fd, buf + count, remain - (count - 3)); in read_hci_event()
149 static int read_command_complete(int fd, unsigned short opcode) in read_command_complete() argument
156 if (read_hci_event(fd, (unsigned char *)&resp, sizeof(resp)) < 0) { in read_command_complete()
288 int ldisc, len, fd, flow_ctrl; in st_uart_config() local
300 fd = open(sysfs_dev_name, O_RDONLY); in st_uart_config()
301 if (fd < 0) { in st_uart_config()
305 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
[all …]
/device/generic/goldfish/gnss/
Dgnss_hw_conn.cpp31 int epollCtlAdd(int epollFd, int fd) { in epollCtlAdd() argument
35 ret = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL)); in epollCtlAdd()
39 ret = TEMP_FAILURE_RETRY(fcntl(fd, F_SETFL, ret | O_NONBLOCK)); in epollCtlAdd()
46 ev.data.fd = fd; in epollCtlAdd()
48 return TEMP_FAILURE_RETRY(epoll_ctl(epollFd, EPOLL_CTL_ADD, fd, &ev)); in epollCtlAdd()
121 const int fd = ev->data.fd; in workerThread() local
124 if (fd == devFd) { in workerThread()
132 int n = TEMP_FAILURE_RETRY(read(fd, buf, sizeof(buf))); in workerThread()
144 } else if (fd == threadsFd) { in workerThread()
150 const int cmd = workerThreadRcvCommand(fd); in workerThread()
[all …]
/device/generic/goldfish-opengl/shared/qemupipe/
Dqemu_pipe_guest.cpp29 const int fd = QEMU_PIPE_RETRY(open(name, flags)); in open_verbose() local
30 if (fd < 0) { in open_verbose()
34 return fd; in open_verbose()
47 const int fd = open_verbose("/dev/goldfish_pipe", flags); in qemu_pipe_open_ns() local
48 if (fd < 0) { in qemu_pipe_open_ns()
49 return fd; in qemu_pipe_open_ns()
60 if (qemu_pipe_write_fully(fd, buf, bufLen + 1)) { in qemu_pipe_open_ns()
66 return fd; in qemu_pipe_open_ns()
/device/linaro/hikey/gralloc/
Dframebuffer_device.cpp97 if (ioctl(m->framebuffer->fd, FBIOPAN_DISPLAY, &m->info) == -1) in fb_post()
99 AERR("FBIOPAN_DISPLAY failed for fd: %d", m->framebuffer->fd); in fb_post()
109 if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0) in fb_post()
121 if (ioctl(m->framebuffer->fd, FBIO_WAITFORVSYNC, &crtc) < 0) in fb_post()
123 AERR("FBIO_WAITFORVSYNC failed for fd: %d", m->framebuffer->fd); in fb_post()
136 if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0) in fb_post()
138 AERR("S3CFB_SET_VSYNC_INT disable failed for fd: %d", m->framebuffer->fd); in fb_post()
149 if (ioctl(m->framebuffer->fd, FBIOPUT_VSCREENINFO, &m->info) == -1) in fb_post()
151 AERR("FBIOPUT_VSCREENINFO failed for fd: %d", m->framebuffer->fd); in fb_post()
200 int fd = -1; in init_frame_buffer_locked() local
[all …]
/device/linaro/dragonboard/qcom/tqftpserv/
Dtqftpserv.c62 int fd; member
91 len = pread(client->fd, p, client->blksize, offset); in tftp_send_data()
216 int fd; in handle_rrq() local
276 fd = translate_open(filename, O_RDONLY); in handle_rrq()
277 if (fd < 0) { in handle_rrq()
284 fstat(fd, &sb); in handle_rrq()
291 client->fd = fd; in handle_rrq()
319 int fd; in handle_wrq() local
332 fd = translate_open(filename, O_WRONLY | O_CREAT); in handle_wrq()
333 if (fd < 0) { in handle_wrq()
[all …]

12345678910>>...17